Welcome back to Think Tech. I'm Jay Fidel. This is Think Tech Tech Talks. It's actually tech of the antiquities. Today we're going to look at COVID and the pandemics of antiquity, a very interesting idea and program and history and pieces of classics. We're going to compare the pandemics of antiquity with each other and with modern-day COVID. With an archaeologist, professor of classics at UH Minoa, Robert Littman. Welcome to the show, Robert. You do look a little funny, but I think you're safer that way. That's right. Everybody, I am wearing a mask. Now, if you look at this mask, this is the mask that was worn in the 15th, 16th centuries to combat the plague. Now, it's no different from the mask that we wear today. Today we are a little more sophisticated and we wear the N95 mask. Now, this mask was worn mostly by the physicians when they went to treat people and their theory of disease was that the disease was caused by miasma, something in the air and that led to the four humors, the black bile, blood, phlegm, and yellow bile being imbalanced. In fact, these masks worked a little bit during things like the bubonic plagues, but in the end, the rats and the fleas got you and it didn't really protect you. I remember reading in the, I guess it was in Barbara Tuckman's book, the calamitous 14th century about the bubonic plague and how it spent itself over a decade or two. It traveled all over Europe and then it was things were quiet, but 20 years later it came back and maybe in a more moderate form and actually when you look at that European history, maybe global history, you see that these things come back over a period of time and arguably they keep coming back till today, but if you look backward they had to be, you know, all the way back into antiquity and they have been with us as a species for thousands of years. Am I right? Yes, well we've had disease as long as we've had human history, we've had disease, but what happens with plague diseases and these pandemics is that you need a large enough population because, let me just give you an example, measles. We have measles rearing its head again, but measles is such an infectious disease that within a few weeks it'll go through a city that has a large population. For example in 1875 in Fiji, a ship docked at port with someone that had measles and no one had any immunity to measles there and within three weeks 75,000 out of 125,000 of the population died from measles. So the reason that we get these diseases that come back in waves is that the first go round the disease hits a very large percentage of the population that's susceptible. Well within, and there are some that never get the disease, but within 10, 15, 20 years you get another generation coming up who don't have the antibodies to the disease, so you get another wave. Now if you look, one of the great diseases in the West was the influenza epidemic of 1918 and that came again in waves over a period of six to eight years and it's still with us the 1918, but what's happened, it's influenza A. We've developed a general immunity to that strain, so now it's a mild cold rather than a deadly disease. So we all are concerned about COVID and it's coming back, it has mutated in a lot of different forms, but it will come back and we will have future outbreaks. Our children will see and future outbreaks, but they probably will not be nearly as severe as the population gets immune. So with something like the bubonic plague, once everyone realizes the big wave of it was in the 14th century in Europe, 1358, but it kept coming back for a hundred years. The same thing, the earlier outbreak that we'll look at of the bubonic plague in the time of Justinian in the 6th century AD came back for another several hundred years in different waves. Now can I have the first slide? Now one of the things that we see in this pandemic is that lessons from history, Santayana had said, the philosopher, that those who cannot learn from history are doomed to repeat it. Those who do not remember their past are condemned to repeat their mistakes. Now the... Here's a picture of two people. On the right side is the ancient historian Thucydides. On the left is Boris Johnson. Now when the COVID broke out, Johnson was the Prime Minister in England and he was not very concerned about COVID. He poo-pooed it. He had parties, gatherings, social gatherings, even though they were forbidden in the country and of course that led to his resignation as Prime Minister. The irony is that Johnson, when he was at Oxford, studied classics like myself where I also studied at Oxford many years before Johnson and one of the authors that he read was Thucydides. Thucydides wrote an account of the plague of Athens and he described its symptoms and he says he was writing his description so that if the plague ever broke out again people would be able to recognize it and to learn about human behavior. Sadly Johnson did not learn did not learn from history. Now about a... When COVID was at its height in 2021, I gave a talk at Think Tank and looked at some of these and one of the things that I looked at, the lessons that we could get from history is that diseases mutate.  While there were some many people at CDC, Centers for Disease Control and many leading scientists around the world trying to get as much vaccination as possible before we got these changes in symptoms, it was an uphill battle and they're developed in America this particularly this political divide particularly among the Republicans of anti-science and anti-vaccine. Not all Republicans, we've got the Robert Kennedy Jr. who joined this this bandwagon of anti-vaccines. These people who did not want to get pushed against vaccination paid absolutely no attention to history. If you look at one of the greatest scourges of human history, which I'll talk a little about that's been around since at least the time of the Athenian plague and which may in fact have been smallpox, that scourge is smallpox. One of the great human achievements in science was the elimination of smallpox. Around in the 1970s the last case of smallpox occurred in the world and if you look in the 20th century alone over 500 million people died of smallpox and how were we able to save this human populations? We did it through vaccination and it's interesting that the way the World Health Organization managed to do this was an interesting study in how diseases work. Diseases need susceptible hosts. They need fresh meat, fresh victims. There are many diseases that either confer complete immunity once you've got it like smallpox or others like COVID once you've got it, partial immunity. But with smallpox the World Health Organization kept trying to vaccinate the whole world but they couldn't do it because there were too many pockets of people they just couldn't get to. So in the 60s they changed their strategy a little and what they did was to wait until there was an outbreak of smallpox, get the general population vaccinated with smallpox for a smallpox vaccination. And you know clearly in America virtually everyone was vaccinated with smallpox. You couldn't travel outside the United States without a yellow vaccination card that you had to be snapped that you had your smallpox vaccination. So what they did in the World Health Organization is they waited till there was an outbreak in a particular place and then they went in and they vaccinated everyone in a 10-mile radius and then once they did that the the pathogen the disease had no place to go because everyone around the area was vaccinated and contained and that's how they finally eliminated through vaccination this scourge. Now if you look with the development of smallpox in 1900 with development of vaccines in 1900 the life expectancy in the west was 47 and in antiquity at the time of the Greeks and the Romans life expectancy was in the 30s like 20s and 30s and it went up from 1947 till today through several factors vaccination was a big factor childhood vaccinations to keep children from dying previously to our modern age half of all children died by the age of five now the so it's clear in human history you're going to have these diseases you're going to have the plague diseases you're going to have these diseases that are around that are endemic but that if we don't learn from history as Santiana said we're doomed to repeat it so if you don't want your children to die before they're five years old like they used to get them vaccinated. Could we have the second slide please okay now one of the things that we see that we learn from history of course is the whole issue of how diseases are spread here's a picture of a lady called Hilda Churchill she was born in 1911 and died of COVID at the age of 109 in 2020 or the the what she had the Spanish flu when she was a child and then ultimately died over a hundred years later of COVID and she commented that it was very similar to Spanish flu but on her day there were no planes and somehow it still managed to spread over the whole world now if you look at something like the Black Death that started perhaps on the Silk Road it took several years to spread from to spread from the Middle East to England and the but and we get the the word quarantine from the spread of the Black Death. Quaranta means 40 days and this was the amount of time that a ship was held in port before the sailors could get off because they figured within 40 days everyone was either cured or dead from the plague on board with these Spanish flu it spread all over the Spanish flu spread all over but with the COVID because we have airplanes it spread super fast so we had the first outbreaks in in early December by December 31st 2019 it had spread to almost the entire world within a month or so after that all these outlying all these outlying areas islands Polynesia it all got it okay can we have the the next slide okay now why do we look at the history of disease well if we look at how people react in the past how we deal with things in the past it helps us to understand what we do and how we deal with a new situation it's really interesting that and of course one of the things that looking at the history of these diseases helps is that it takes these diseases go over generations hundreds of years it helps us understand what's going to happen now we use laboratory rats to model these diseases laboratory rats have a life expectancy of about two years so they go through the generations very fast versus the human generations of 40 years so for example when we look at how syphilis is behaved in the human population it really hit about 1492 4 to 1495 it broke out and it was a horrendous disease it attenuated it got it spread rapidly it got milder and milder so when we look at these diseases in history we can start to understand how these plague diseases are going to behave and what we can do to to mitigate and combat them so we learn to the past from the past theoretically and how to deal with pandemics let me let me let me interrupt for a moment Robert and ask you about how how somebody studying this gets the data you know I guess it really revolves around the entire study of antiquity but how do you find for example that someone died of disease how do you find for example what that disease was like with symptoms can you can you in a dig can you get the DNA can you get a microscopic a genetic study of what was wrong with this individual is is there that kind of technology available okay now um last year uh a man called Svante Pabo won the Nobel Prize in medicine and Pabo what Pabo did was to sequence the DNA of the Neanderthal and in the last 20 years there's been an incredible development in in ancient DNA extracting DNA from skeletal remains there's a major one of my colleagues David Reich at Harvard has a big lab and he is rewriting all our understanding of early human history through this now one of my collaborators that I that I worked with is is an expert in extracting the DNA of of ancient DNA microbial DNA from from skeletal remains one of the things that he has managed to do is to extract the DNA of the Justinian plague this is the plague that struck the Empire of Justinian the the Byzantine Empire of Justinian around about 535-40 AD this bubonic plague outbreak spread throughout all over Europe all over Africa North Africa all over southern Europe it was of a similar magnitude of the destruction of the black death now what uh the uh the extraction of the DNA was able to show that it was bubonic plague not only was he able to show that it was bubonic plague he was able to show that it was a different variant than the one that occurred in the black death so what's happening now he and I um also collaborated on trying to extract the DNA of a mass burial in England from the second century AD in the second century AD there was a an enormous plague that hit the Roman Empire we label that the Antonine plague it was most likely smallpox and you know we do this identification from the ancient descriptions they the clinical symptoms now the problem with looking at clinical symptoms particularly when you're dealing with these ancient writers is they're not very accurate so um and there are many diseases that if someone who is not an expert describes them they look the same so for example smallpox has a rash it's a more postular rash uh typhus has a rash also but the rash of typhus is a very a very flat rash um and so the ancient descriptions let us at least figure out who got the disease where they got it when they got it gives us an idea of how many people died from the disease from these ancient sources but the actual identification of what the disease was uh is really only achieved through the DNA and that research is just developing so incredibly rapidly unfortunately um my colleague and I had to point our and myself when we extracted the DNA from the second century burial it was a mass burial and that's what let us think it was a plague burial uh we busted we couldn't there was the DNA was too degraded for us to identify the disease but what's going on with this DNA is really revolutionizing our understanding of how diseases work because we're realizing that many of these ancient plagues and these microorganisms were not very stable that they they were constantly changing with different variations different variants and that the and that one variant might be kill half the popular quarter of the population another variant may not kill many people at all so this we're really getting a for the first time in in human history and understanding of how how diseases change morph and adapt to human population so it's really changing the nature of of our understanding now you talk you talk about the diseases it sounds like from what you say Robert that most of this is viral rather than bacterial now there's a lot of bacterial stuff as well bacterial stuff bubonic plague you know there's a lot of a lot of viral bacterial plagues as well the what happens is we treat them today we treat them differently bacterial plagues we tend to treat with antibiotics viral we have now developed some antivirals like pax levid for covid but the most effective way of dealing with these viral plagues is vaccination so you know and the technology of course is moving unbelievably rapidly the true marvel of the covid vaccination is that in about a year from the outbreak of the disease the the vaccine was developed tested and distributed in a year now the previous to that the fastest vaccine out there was probably months vaccine for months and that took six years to develop so the change the change in the in science has been just enormous but of course one of the things that we need to do in all of this when we look at how disease moves through human populations is just keep paying attention to the the past and educate our population to the past I mean the idea of this anti-vaccine movement in America was just mind-boggling how after we've saved so much of of so many lives millions and millions and millions of lives through vaccination you had politicians getting out there saying oh don't vaccinate it's bad for you you know and this anti-vaccine now covid is not the last of these diseases that we're going to have and when the next one comes along which it will because that's what happens with human populations we absolutely need to be prepared if we can develop a vaccine to get out and vaccinate the population and if we don't do that we are doomed to repeat the mistakes of the past you know one thing strikes me from what you've said is that so we we go back in antiquity in the history of humanity and we find some genetic codes some some DNA of the of the antigen some have any of these diseases that we identified through the science you're talking about have they totally disappeared off the side never to be seen again yes there are there are some diseases that have totally disappeared but um or certainly or vary variations of them we get one uh there's one that uh a rinder pest that was uh among cattle that disappeared it was just so virulent that it killed off populations there was a in the 15th century in england there was a some sort of this outbreak of a type of plague that just disappeared so some of these do in fact disappear you know and you've mentioned also that seems like masks such as what you showed before but also the progeny of those masks who are reinvention of them you know have been a primary thing as as vaccinations but what if anything is there to learn or from the pandemics of antiquity and to put that in our kit bag to use other lessons that we have not used but we have learned from the past well one of the things that antiquities always did is real they realized even though they didn't understand how micron organisms worked they understood contagion that if you isolate and separate you're not going to catch the disease and uh one of the things we did learn that in by during covid those who did separate like in hawaii we had one of the lowest rates of of covid because we had a lot of quarantine a lot of separation we had the closing down of a lot of schools we learned we learned from the past set you isolate and you're going to survive you don't isolate and you're not going to survive and one thing that has happened in modern times which is a little chilling is that science has not only directed its effort to prevent and to cure but also to enhance these diseases make them weapons and that that's letting the genie out of the bottle that has never happened in antiquity or in history until now is that how does that change the calculus well not quite um the uh british troops used infected the american indians deliberately with smallpox they put smallpox soar spores on blankets and then gave the blankest the indians to infect them so and of course cortez never would have conquered mexico if he hadn't infected the aztecs with smallpox so you you do have uh germ warfare and even in um medieval times they would take uh animal carcasses and put them in wells to pollute the water uh but of course the weaponizing of uh of bacteriological warfare is always an issue but the problem with it is that these microorganisms are a lot smarter than we are they're gonna figure out uh how to survive you're not uh it's a dangerous game to play to try to use uh biological warfare the religions tried to do it with this lab in uh in russia and actually there was this lab accident and infected the people in the lab with anthrax and actually one of the people who worked in that lab ended up uh working at u h some years ago i don't think she's still there uh but it's it's it's not a very effective weapon because of the ability to uh to control it you can't stop infections from spreading even if you got a biological weapon that worked it's there once it passes through the human body it's going to mutate and change and you're going to get other variations this would happen with covid and that and that even if say you develop a vaccine and then use it on the enemy we've seen that our that our population a lot of people just don't want to get vaccinated so if we developed a weapon to use against the russians it would boomerang and hit us again and vice versa you know one one one thing that um that has come up when issued has come up and this goes to um the question of whether um whether a weaponized version of covid was developed in china uh is the alternative to that namely that it came from the wild it came from animals certain kinds of animals in the wild through the wet markets in china you know and uh and and people picked it up from that rather than a laboratory accident but seems to me that um the notion of what do they call it spilling when you when you spill from the animal the animal community to the human community depends on how close humanity is to the animal community and if you throw them closer and closer into the same geographical area you're going to enhance the possibility of spilling and we live at a time when that that exactly that has happened was that happening in antiquity too that's absolutely and now there are fewer it's gotten much better the reason it's gotten much better is we've killed most of the animals you know in europe what's left there you know foxes uh you know there's nothing left in europe in america there's nothing left you know a few wild cougars and buffalo and whatever but in africa there's a lot left so the best way you know to reduce the development of new diseases is kill all the monkeys i mean kill the chimpanzees and the monkeys these are close relatives this is where aids comes from uh if we kill if we get rid of these wild animals we'll be in a much better uh place uh of course you still had the swine flu from domesticated uh pigs that you know that develop well but don't we have an environmental side effects of getting rid of a species of course i mean you know uh but as africa gets more civilized as the wild gets pushed back and regulated like it does in the west there's going to be a less of a reservoir for developing these diseases because the animals are often a source of many of these diseases you know for this discussion you you've listed the plague of athens in 430 bce and the antinine antinine plague um what is it 165 to 180 ad and the justinian plague 500 and changed 540 ad but what about and the sippery you mentioned the sippery the sippery in plague in 1250 at 250 that's 250 ad yeah so you know it seems to me that the the way history has looked at this is that there are distinct plagues distinct phases distinct eruptions um but isn't it so from what you've said this is just a continuing process and you can identify a plague here and a plague there the fact is it's one continuous plague well yes that there are diseases as long as they'll be humans there are there will be these plagues and outbreaks but we have come such a far way because we have developed antibiotics against bacterial plagues we have developed vaccines against viral plagues and look if coveted hit 200 years ago it would have wiped out hundreds of millions of people instead of it still killed several million people but the effect of it would have been much much less so yes we're going to have more covids maybe not in my lifetime of your lifetime but probably in our children's lifetime maybe another 100 years it may be 50 years before we have something like this again but it will happen again but we are better every generation every year we are better and better equipped to dealing with the um to uh to human disease that's why when the antonine when the plague of Athens broke out even without the plague life expectancy in Athens was about 32 or 33 even with coveted our life expectancy is still in the west close to 80 uh so we've come a long way in human history in dealing uh in dealing with all of this but would you rule out the possibility that there will be a mutation that we can't you know we can't cure so quickly um and i'm adding to that the point that um the latest science is to try to get right down there into the genetic code for these viruses anyway maybe the bacteria also um and make it a sort of a dynamic vaccine that deals with whatever that uh you know that that antigen really is so that you you have like one size fits all kind of vaccine uh or is it possible that we will have a we will have another plague another pandemic that we can't we can't fix and we'll kill a lot of people anyway okay the there is there are several people um in Mount Sonnet hospital in New York working on a flu vaccine that will work for any type of flu and i think it's being tested at this point uh it um it is happening it will happen uh that we are going to get better and better with our vaccines could we get an organism that we can't deal with um i think given the stage of our ability to make vaccines i don't i think we're going to be i think it's highly unlikely that we'll be won't be able to develop something that works now there are some diseases that we have no cure for like Ebola but often those diseases if the fears as if a disease gets too fierce and too deadly it's not doesn't survive because it kills off people too quickly i mean Ebola kills off people really fast and they die before they have a chance to spread it and this doesn't have a very efficient means of spreading itself so and we've seen this the past in the history of disease if the disease is so virulent that it kills everything around it then it kills before it can spread now occasionally you get very very clever diseases like AIDS the the virus that that deals with with AIDS because it kills slowly and someone can carry it for years so it's a very very deadly now that's the sort of disease that is the greater long-term threat and i think uh i think we're too clever as a species i have no fear that we will win the battle against the against microbes going forward in the future and we're getting better and better at it well you're assuming that science will out but you know what we saw during the Trump years was a lot of people you know didn't believe in science and rejected and rejected vaccines not only for COVID but for other things and they're quite remarkable and i'll bet if we and this is really a question if we look back in history if we look back you know in the classical times we will not find political efforts to prevent people from using the science that was available at that time in order to cure the population oh well you'd be surprised we don't change there was the anti-science look the church the catholic church was very much anti-science and change they looked at disease these ancient disease these plague diseases as a punishment from god uh and that uh uh they resisted any attempt to treat them because accept the idea of the accept your fate it's a punishment from god now people we've gotten better educated and smarter but we're still full of the same fears and superstition that that we always have been so it's a constant battle to educate our population and even then education doesn't really work i mean i see it's a failure of us of we professors that we have people that we haven't educated uh who understand the importance of vaccination and modern medicine last question because i think we're running out of time a little um last question is um is the solution to this also in in government and in legislation and in making rules that require people to take vaccinations that punish people who don't take vaccinations oh absolutely yeah absolutely you know the thing is if someone doesn't want to be vaccinated i have no problem with that but don't let him come near me or my children or my grandchildren if you don't want to get protected then you should give up your right to socialize with people uh and i and it used to be you can't go to school without getting your vaccinations and now they've created these crazy quasi religious objections which are just supers just made up there's no religion uh that that's that speaks against vaccination and so if you want to participate in the society you have to be willing to get vaccinated otherwise stay out of public you don't want to be vaccinated go live on a farm somewhere and don't come near me you know i wanted to ask you your parting words maybe you've already given them but what would your parting advice be looking at this historically from classical times uh till now and and seeing how it all integrates and how it all connects uh what should what should the average citizen be thinking uh as and when this comes up again yeah when it comes up again our scientists are wonderful we'll be able to overcome all of these listen to our scientists don't listen to the politicians listen to the scientists and and listen to the professors of of classic classical history too yes and and what about one of those big masks can i get that where did you get that i need to get i got it in venez i was visiting venez last winter and uh they still they still sell them and i don't know it might i'll have to talk to my epidemiological friends to see if it'll work as well as an n95 mask you may be surprised with the answer that's right yeah thank you robert robert lippin dr robert lippin an archaeologist who has traveled all over north africa and the middle east to do digs and the professor here at u.h. minoa of classics thank you so much yeah you're very welcome aloha


Is it advisable to consolidate small amounts of Bitcoin received over time to different addresses within the same wallet into a single address? This is one of those questions where it depends. It depends what you're trying to achieve. And there's pluses and minuses of such an approach. Let's talk about pluses first. If you have a lot of very small UTXO, UTXO are unspent transaction outputs, whether they're in different addresses or the same address, but they're just kind of fragmented little chunks of coin, then when you construct transactions with those, those transactions will have many, many inputs. So transactions consume chunks of coin that have been sent to you and they're indivisible.  That transaction is going to be a heavy transaction and it's going to be a big transaction in terms of bytes. And so the fee that you're going to pay for that, depending on the current rate in Satoshi's per byte to get into the blockchain, may be quite hefty. To answer your question, if you can find periods of time in the network where transaction fees are really low when the network is underutilized and that happens every now and then, then that is a good time to consolidate some of the change or small amounts in your wallet into larger amounts. And that will allow you later when you want to make a transaction and the network is congested and transaction fees are higher, that larger amount will be in one chunk, one UTXO of coins. And so your transaction will have one input instead of many inputs and that will make it a much lighter weight transaction with lower fees. So yes, wallet consolidation is something that you might decide to do during a period of time where the network is quiet and fees are low. However, that's mostly about consolidating multiple different coin amounts into a bigger chunk of money. I wouldn't necessarily consolidate different addresses into a single address, unless it's necessary because those different addresses also have small chunks of money. And the reason for that is because it will damage the privacy that you have. If you consolidate different addresses into one, what that signals to anyone watching the network and doing statistical analysis, correlation analysis on the blockchain is they're going to assume that likely that final address is controlled by one person. And when you make a transaction where all of those inputs are aggregated, they're going to assume that all of those original addresses belong to one person. If any one of those addresses has been associated with your identity through an exchange or a merchant that participates in these KYC schemes, then they'll be able to assume that all of those addresses belong to you and track you and break your privacy. This is a double-edged sword. On the one hand, doing consolidation of UTXO when fees are low is a good idea. On the other hand, if you consolidate for many different addresses or many different chunks of Bitcoin, if you do it in a sloppy manner, if you're not careful about how you combine them, you could reduce your privacy.


What's up everyone, Jossi here. And I really wanted to make this video because I see this trend where people only really talk about the positive aspects of the tech industry and being a software engineer. I myself definitely am guilty of that. I have at least probably a dozen videos where I only really talk about the positive aspects of being a software engineer, which can kind of make the industry and the job itself seem a bit unrealistic. Aspiring software engineers should have a deeper understanding of what the reality is like for software developers opposed to just these expectations of a six-figure salary and free coffee and snacks at work and being able to bring your dog to work. For one, as someone who desired all of those things, I realized that those are major perks, but there are some not-so-healthy things that come along with lending that dream, paying job, or really high-paying salary. So what are some of those negative things that come along with being in the tech industry as a software engineer working for a competitive company? The first thing that I can think of is burnout. So what causes burnout?  You have more meetings, but also have the same amount of programming, which can get overwhelming quickly. For one, your backlog seems like it's a never-ending growing list of bugs and refinement and UI, UX work and technical debt that your developer team never gets to because most teams are typically like under-man. Like there's usually like a need for more developers, which is another issue in tech. Also, success gets pretty addicting, especially with all these videos talking about how people are making $120,000 right out of college. People are making $200,000 in their 20s. It makes you want to make that amount of money as fast as you can. So you jump from company to company and you're working on your skillsets at work obviously and then outside of work, you're programming and coding all the time, not building healthy sleep habits. So that's one example of how programming or just the tech industry in general can cause stress and overload, which leads to burnout. That's an example of burnout while you're working in a job as a software engineer. Let's talk about the burnout that people experience before they even start their first day at work. When I was preparing for technical interviews, I seldomly had time for really anything else, which really created this like poor quality of life. I was not only programming for my regular job, which was quite difficult at times and demanding, but I also was studying data structures and algorithms, basically a student after 5pm, which is a totally different beast. Like your actual software engineering job is significantly different than like what you're studying and preparing for, which is another reason why I don't understand the purpose of some of these technical interviews. They don't reflect what your reality is as a developer. Programming for a company takes creativity and collaboration along with having the ability to Google stuff and go and stack overflow to debug your code or figure out how to create whatever thing that needs to be created. Whereas in an interview, they can ask you any question. So I was studying algorithms and data structures. I was doing at least two medium lead code questions a day along with watching Stanford lectures on data structures and algorithms. And I even went as far as doing virtual peer interviews through PRAMP, which I definitely recommend that definitely helped me a ton. And I also got really good objective feedback from people who don't know me. The point that I'm making is applying to a million jobs because let's just be honest, like LinkedIn at this point is just a resume stack along with preparing for technical interviews, interviewing and then starting the job to make a lot of people feel exhausted. I know for one that after I finished my interviews I was like, I don't think I ever wanna do a technical interview again. I was preparing for my technical interviews. It was during the holidays. So literally during New Year's Eve, I celebrated with my wife and her family for like a couple minutes when the ball dropped. And then after that, I was on the iPad studying for the technical interview that I had like in the next five or six days. It's such a horrible feeling when you get declined from a company where you made it to like the final round of interviews. And that happened to me a couple times. Now, obviously I'm really grateful to even have those opportunities but you can feel really defeated when you like do three, four, five rounds of interviews and then you don't get the job and then you don't really get a clear reason for why you didn't get your job. Oh, you just need to work on data structures more or algorithms more, but that's such a vague statement and that really is predicated on who's interviewing you at the time and how nitpicky they're being. There's this other thing in tech that can be really annoying, which is that double standard. For one, there's that whole gotta be able to prep for the interview and study for like an ACT or SAT that no other industry really has to deal with. And then there's that double standard that, oh, you should really be eat, code and sleeping. Like that should be your lifestyle. It can feel that way, especially when you're a junior developer because see when you're a junior developer, your job really is to just learn the code base like as well as anyone and knock out as many pull requests as possible. It seems like to be considered a successful developer, you need to not only open and close a bunch of PRs in a sprint, but also need to code outside of work and be up to speed with all the latest technology. And see, that's probably one of the more frustrating things when it comes to the tech industry, especially if you're someone like myself who has other interests outside of coding. I honestly feel like I can't keep up. Like, I like to work out. I like to play basketball. I like to, I don't know, go on walks with my wife and do photography and videography. You know, I kind of have a YouTube thing going on that takes a lot of time. And sometimes I feel like I am not doing enough as a developer. Here, my co-workers talk about all this new technology that they have experience with outside of work and the things that they're doing outside of work. And it makes me feel like I'm slacking. When in reality, I'm not because what other industry do people expect you to do the same kind of work that you do at work at home for like fun? Like, only industry I could think of is like athletics, right? You have practice in your games, but then you're also expected to work out and do other things to get better. And technically, programming is like that because it is a skill set. And it does seem like a lot of your value is based on how well of a developer you are despite the fact that company told you that they didn't hire you because you weren't a culture fit, a culture fit. And that's the irony of it all. We all know that, yes, programming is a very competitive field, especially landing a really good job, but there's a lot of in-demand jobs and there are way more jobs than there are programmers. But there's that feeling that you get where you feel like you're in jeopardy of potentially losing your job or looked down upon if you feel like you're not the best developer on your team. I think there's a lot of imposter syndrome that goes on within the tech community, especially amongst developers and a lot of comparing, which is really unhealthy because the reality is if you have programming skill sets and you're working for a company as a developer, you are very valuable. I know that some people eat sleep code and they're fine with that, but some of us, we enjoy technology and we like programming. We need to rethink how many hours we should be programming, especially for like our mental health because programmers are interacting with computers all the time, all day, and we need that human interaction. So I definitely think we need to reevaluate that 40 hours a week whole thing for everybody, but definitely for developers. Anyways, that's my rant on why you maybe should not become a developer or really the harsh realities of being a software engineer. And my motivation behind this video isn't to discourage you, but I recently saw how difficult it was for my wife and her peers throughout their coding bootcamp. And I can only imagine how excited they were in the beginning about to become the software engineer and make all this money, which is definitely a reality, but going through their coding bootcamp, a lot of people realized that, hey, this really isn't for me. And I think I just was thinking about like all the opportunities and the money and not thinking about the stress of critical thinking all the time. That concludes this video. I hope you all enjoyed it. Comment down below some of your thoughts on this topic. I'm curious to see what you all think. I love engaging with you all through the comments section. And as always, have a wonderful blessed rest of your week. I'll see you all soon. Peace.


Let's do this problem now, converting between Kc and Kp. So this one says a chemical engineer injects limestone into the hot, blue gas of the coal burning power plant to form lime, which scrubs sulfur dioxide from the gas and forms gypsum, calcium sulfate, dihydrate. Find Kc for the following reaction if carbon dioxide pressure is in atmosphere. So we have the formula that we were just given for the conversion of Kp to Kc, right? So it was Kp equals Kc times RT raised to the change of the numerals of gas in the reaction. So notice it's just gas in general. It doesn't matter what the identity of the actual gas is. So if you want to come over here, how do we do the change in anything? So the change in number of moles of gas is going to be the number of moles of gas final minus the number of moles of gas initial, right? And so the final number of moles of gas, just from our balanced chemical equation here, we're just going to assume it's a 1 to 1 to 1 ratio, and so I'm just going to say 1 mole. So 1 mole minus, how much gas do we have over here? Zero moles. Change is going to be 1. So we've got Kp, and we're looking for Kc, though. So we've got to rearrange this equation. Let's isolate Kc. Kc equals Kp divided by RT raised to the change in number of moles of gas. So we have Kp, 2.1 times 10 to the negative 4, divided by 0.0821 liter htm over 1 mole Kelvin. And you honestly don't even have to expand it out, because again, we're just going to kill all of our units in a second. So we've got that raised to the 1 or 1 mole or whatever you want to say. But again, all our units are going to be killed. So has everybody got it to this point? Does it make sense, at least, to get to that point? So let's just solve our problem now. So this should go to 2 safe pips. So I get 2.6 times 10 to the negative 6. No units, OK? So remember, why is this important? Because for reactions where gaseous products are formed or you have gaseous reactants, it's hard to figure out what the concentration is. So if we do it this way, we could figure out what the Kc is through using the pressure rings from our monomer. OK? Any questions on this one? Pretty straightforward, right?


Hello, my name is Isaac Sessi and I'm the CEO of Sessi Technologies. I am excited to share how my team is solving post harvest losses in Africa through technology. Up to 30% of grains grown in sub-Saharan Africa is lost to post harvest losses with moisture and storage related issues accounting for the majority of the losses. And this happens because farmers are often unable to access affordable technologies that can help them measure their moisture content and store properly. There's results in grains being infested with insects and mold and farmers smoothing a lot of their income. While technologies exist to solve these moisture and storage related problems, smallholder farmers are often unable to access them because they are complicated to use, they are difficult to find and they are expensive, far often outside the reach of the farmers. To solve this problem, my team developed grain-made grain moisture meter, an affordable, effective moisture meter that makes it easy for farmers to measure the moisture content in their grains before storage. With grain-made, farmers can know whether their grains are dry enough for storage so that they can reduce mold growth and insect infestation. It costs four times less than existing solutions while offering better accuracy. And we have third grain-made with hermetic storage technology and have made it available to farmers. And what's nice is that farmers only have to exchange a few bags of grains to be able to access the moisture meter and then the hermetic storage bags. And even what's more exciting is that we have created a marketplace where we are now able to list the produce of farmers onto the marketplace for them to get premium prices. And what that has resulted in is a reduction of losses and an increase in the incomes of farmers by as much as 30%. All of this is being made possible by our Pachnett team that is dedicated to empowering farmers with affordable technologies. I am very grateful to Impact Engineer for this nomination and will continue to work to create and live in a world where poverty and hunger does not exist. Thank you.


From Hollywood it's time now for Johnny dollar, I've been trying to call you. I know I was out. I'm sorry. You keep pretty late hours. It's after midnight No, I'll come over Betty, but not to talk about the moon of the water Yeah, a little thing called murder Tonight and every weekday night Bob Bailey in the transcribed adventures of the man with the action-packed expense account America's fabulous freelance insurance investigator yours truly Johnny dollar Expense account submitted by special investigator Johnny dollar to amalgamated life associates home office Hartford, Connecticut Assignment the Crystal Lake matter Expense account continue item six two dollars tip to the Crystal Lake Hotel garage attendant for rousing him out of bed to get my car I Wanted very much to have another talk with Betty Norton the wealthy glamorous girl on the other side of the lake She had told me she hadn't been with Edward Russell when he left the hotel bar the night He was murdered but the bartender at the hotel swore that she and Russell had left together If she'd lied about that maybe she'd lied about a few other things When I got to her Lake Shore mansion She had a few well-spaced dim lights burning a dreamy type record playing and some drinks mixed the whole bit You are Johnny bourbon isn't it? Yeah Ah, you've got a good memory Betty sure I always remember what's important or what you want to remember Same thing isn't How about the things you don't want to remember? meaning How about a questions I want to ask you now don't start making with those dull questions again look Let's just have a drink Last time I had to go swimming with you before you'd answer this time.  Well, I thought we might dance to with you leading I suppose Sorry Betty, I know you probably own quite a few things in this world, but the list stopped short of me I want some answers from you, and I want them now Okay, so be a party pooper so ask questions You told me you met Edward Russell in the hotel bar the night. He was murdered you had one drink with him and left That's right You lied Betty who says so the bartender at the hotel My I've always tipped him so well to look baby. Suppose we cut the comic routines, huh? All right, so I left the bar with Russell. Why did you lie about it to me this afternoon? It's very simple Johnny part of the Norton training. I guess what does that mean? My father told me long ago. I could do whatever I liked but to keep it out of the newspapers That's the way I've played it ever since Well that night you're talking about Russell and the bartender got into a fight and that's why I lied to you Believe me. I just didn't want to be mixed up in anything that could land in the papers. I see what happened then He and I went to a coffee shop to sober him up a little you can check that I will then what? Kept mumbling about somebody named Billy was looking for he say much about him No, it wasn't making very much sense Then Hiram came into the coffee shop who hire him the old fellow who drives what passes for a taxi here at the lake He told Russell somebody wanted to see him Russell left with Hiram And you didn't see Russell after that. No, I didn't You don't look convinced Johnny. I'm not you lied once before you could be lying again Sorry, I told you I lied before but this time it's the truth We're gonna get in touch with Hiram his numbers on the cover of the local directory local directory This one over here. Yes Johnny at this time of night. Yes at this time of night. He doesn't usually take calls after midnight Sleep around somewhere Well, I'll check him in the morning What is it? Johnny, what is it? What's the matter? I thought I heard something outside here Could it have been one of your servants? I only have a housekeeper with me here and she went to bed hours ago There are a lot of deer around here. Maybe that's what it was. Yeah, maybe Johnny you call Hiram in the morning.  Are you kidding?  I should have known better But as far as getting interested in him, I wasn't Believe me. I can always find others who like to Play it my way as you put it What's the matter? Oh, you kill me that gold plate at front you put on I wonder if behind it you aren't just a hollow lonely kid Thanks a lot for reminding me mr. Freud. Oh Sorry, I guess that was a little out of line. I guess I was asking for it But you're wrong about me not being able to stand anyone who doesn't play it my way You see I Found someone who won't and I kind of like it Kind of like you that is Yeah, look oh, don't worry. I'm not going to try to appropriate you or to buy you But about the loneliness don't leave just yet Johnny Stay just a few minutes more Okay Just a few minutes. I guess I felt a little sorry for loneliness or maybe it was Well, anyway, I stayed a few minutes more. I think it was just a few minutes. I watch it stopped First thing in the morning. I tried to get higher on the cab driver on the phone again But still no answer. I headed for deputy sheriff Ansel Garrett's office Clarence Bixby who owned the cabin where Russell's body was found was with him Good morning Johnny. That's mr. Bixby. Good morning. Dolly anything new not much Well, I won't take up any more of your time sheriff However, I would like to ask a favor of you though. What is it? So far the Denver papers haven't mentioned which cabin up here the body was found in I'd appreciate it If it could be kept that way otherwise if it got out I'm afraid my chances of reselling the place would be pretty dim Yeah, and anybody who'd want to buy it for that reason probably be the kind of person not very welcome here at the lake Okay, Bixby sounds reasonable enough. See what I can do. That's your blood chef Cigar. No, thanks Dolly. No, no, thanks. Well, I'll see you later fellas I'll be around day or two more if you want me to okay Well, how do things look this morning Johnny? Just like Bixby's cigar wrapper Hmm, I wish he'd quit tying those things and knots Every time he does it it reminds me that we're right in the middle of a knot. We can't untie It's a bear. Oh brother. It's worse than that a Guy named Edward Russell takes off from his home in Denver and disappears He turns up here looking for a guy named Bill of which there are too many in this Then Bixby brings a prospect up here to show his cabin to he finds the padlocks been switched Russell's body inside. Yeah It's the only person who stood to profit financially on Russell's death is his wife Leona beneficiary on his $50,000 insurance policy But she couldn't have killed him the Denver police established her in Denver at the time. Oh, incidentally, she's up here at the lake now Johnny. Oh, yeah, she told me over the phone. You wanted her to confirm the identification How'd she bear up? Not too well kind of rough You get any information out of Betty Norton Well, her story is she had coffee with Russell after his fracas with the bartender Hiram the cab driver came in and told Russell somebody was looking for him Russell went away with Hiram You checked with Hiram. I've been trying to get in touch with him on the phone No answer on the goal on he keeps his cab behind the hotel garage. We can check there and leave a message for him. Okay It's What about Bixby as a possibility? I I thought of that too Johnny It had taken off a lot of nerve to kill a guy and then arrange to discover the body in your own cabin, but It sure would be quite a cover. Yeah Like you say to take more nerve than most men have got Besides we run a check on Bixby and we've turned up absolutely nothing to tie him into the deal at all Now there's no evidence he'd ever known Russell. I know Leona Russell can't remember her husband ever mentioning Bixby's name. I Yeah Hey, wait a minute. How about putting them the guy who wanted to buy Bixby's cabin? Yeah The same thing could apply to him. He knew the cabin was empty He could have planted Russell's body there and then arranged for Bixby to open the cabin It could be except how does he tie in I don't know he said he and his wife wanted to buy the cabin Might be interesting to check with his wife and see what she says not a bad idea Johnny I'll put in a long-distance call to her Don't count on much though at this point Ansel. I'm counting on nothing And I wasn't I was getting nowhere trying to match a logical motive with any of the suspects I Decided I might as well continue checking guys named Bill around town and see if I could find the one Russell had been looking for I Went down to Bill's boathouse at the landing Bill Jensen ran it was a stocky heavy-set man in his late 20s his face looked friendly enough That is if you weren't paying much attention to his eyes They were about the coldest shade of blue. I'd ever seen what can I do for you mr. Dollar boat maybe a little information maybe What about a man named Edward Russell the guy who was murdered what about him did he come around here to your boathouse? Not that I know of Well, he was looking for a man named Bill and I thought you might be the one No, no, I ain't scared was telling me about him, but I'm not the one he was looking for sorry Did you have to see him around town anywhere Russell? No First time I saw him was his picture in the paper after the killing. I see Hey, you got quite a lot of boats here Jensen. Yeah pretty big investment in him You keep the ones here in the boathouse padlocked. I see no I have to used to get one stolen now And then say you want to take one out in the lake now mr. Dollar Not right now Jensen. Maybe they didn't see around All of a sudden I was real interested in Bill Jensen in his boathouse Because some of the padlocks and the boats look very much like the one that had been placed on Bixby's Cabin door the one He pried off when he discovered Russell's body. I Wanted a closer look at those padlocks, but now wasn't the time I Went on back to the hotel to look for Hiram, but his taxi still wasn't there So I left him a message to contact me as soon as possible Then after dark I went back to the Boathouse. There was nobody around I Slipped in the back and took a close look at the boat padlocks Yeah, no doubt about it. They were the same kind as the one on Bixby's door and one of them was missing Yeah, Bill Jensen could be my boy Behind one of the boats and looked around me It was a bad spot to be in I was pinned against a wall I edged toward the rear then dole for the door of the tiny office And I realized my mistake. I figured that the office would have an outside door, but it didn't I was trapped He had looked like I just solved the murder The hard way Oh, here's our star to tell you about tomorrow's episode of this week's story tomorrow a shot in the dark that missed and Another that hit the bullseye Join us. Won't you yours truly Johnny dollar or is truly Johnny dollar starring Bob Bailey is Transcribed in Hollywood written by Robert Reif. It is produced and directed by Jack Johnstone Be sure to join us tomorrow night same time and station for the next exciting episode of yours truly Johnny dollar Roy Rowan speaking


It was a quick turnaround for the Bemidji boys hockey team after a loss to Moorehead last night. The Jax returned home tonight to take on Buffalo at the BCA where they haven't lost in nearly two years. And first period no score. Jax on the early power play Ethan Pickett finds Josh Baker who lights the lamp with the wrist shot from the circle. Jax go up one. That wouldn't be the last week here of Baker. In the second he blocks the Nick Moller shot and he goes coast to coast like buttered toast for the goal. Jax go up two. But the bison would answer. Blake Hobbish redirects the Nick Moller shot past Carson Olson to cut the lead to one. The Bemidji they'd hang on to win stay undefeated at home this year taking down Buffalo 2-2-1. If you've enjoyed this segment of Lakeland news please consider making a tax deductible contribution to Lakeland public television.


To the hardwood BSU men hosting number 12 northern state Saturday. First half Beavers keeping it close. Christian Bacaric to Jacob McNallan in the corner for three. Count it. That'll pull them within three. Wilson extended to double digits. Second half but Derrick Thompson the answer. Top of the key money. That makes it an eight point game. That's as close as they get. They're number 12 for a reason. Nice ball movement to Gabe King. He knocks down the three. They put up 104 on the evening. The Beavers with yet another weekend split. If you enjoyed this segment of Lakeland news, please consider making a tax deductible contribution to Lakeland PBS.


Hey, everyone. My name is James Gallick. Let me just make sure this thing is on. So I go by James Gallick everywhere online, Twitter, GitHub, Instagram, FreeNode. My blog is jamesgallick.com. Very easy to find online. And I work 24-7, so you can always reach me there. I work for a company called Computology. We make a product called Package Cloud, where we do apt, yum, and RubyGEM repositories as a service. If you have a need for public or private package repositories or both, definitely check us out. Come talk to me if you want to talk about packaging. I would venture a guess that I will probably get more excited than anyone else in this room about talking about packaging. So people say this, right? Somewhat often, programmers say this, right? And there's been a lot of talk on my Twitter recently and on some blogs and stuff about whether we should stop saying this or suggesting that we should stop saying this. And I think it's important to distinguish between people who say this in sort of a moment of frustration and an outburst of frustration, because what we do for a living can be very frustrating, right? There's pressure on. You got to ship something. Something's broken. You get frustrated.  And people who actually legitimately believe that everything is terrible, right? I was going to pull my iPhone out of my pocket right now, but I'm not allowed to have it on stage and show you my iPhone and be like, I have a supercomputer in my pocket that can literally summon nearly any media that was ever created via the air. That's not terrible.  But as much as I think that you're wrong if you legitimately believe that everything is terrible, I think that you're probably at the very least naive and possibly being a little bit disingenuous if you don't admit that everything is broken. And I don't mean that nothing works. Obviously stuff works, right? But the reality is the software is buggy and it's flaky and it's unreliable despite our best efforts to make it better. And this actually makes sense, right? We're innovating really fast. We, software engineering is a relatively new field. We're still figuring out how to do it. And we really just haven't caught up with the pace of innovation and growth in our industry and we're still working on it, right? So it makes sense that everything is broken. And as a result of everything being broken, when you get engineers together in a room or online, one of the big topics of discussion is always, well, how do we write better code, right? How do we actually, how do we produce software that's less unreliable or that's more reliable or rather that's more correct, that works better, that handles edge cases better? So all these different techniques for doing that, right? There's testing obviously very popular in the Ruby world, static analysis. And then stuff like what MRB was talking about this morning where with new languages that have more sophisticated type systems that are capable of more accurately expressing the constraints of different units inside of our programs. But one thing that we don't talk about that much or at least in my opinion that we don't talk about enough is how do we cope with and what are the strategies for dealing with software when it doesn't work? Whether it's our code or someone else's code. I said this the other day on Twitter. If you wanna deploy high quality software that performs, you should expect to fix bugs at every level. There's a very simple reason why. Bugs exist at every level.   But bugs in the Ruby VM, bugs in memory allocators, mySQL, all kinds of places. And I always get this question, people asking me like, well, how did you find that bug? How do you go about finding a bug in a code base you're unfamiliar with? How do you go about finding a bug in a language that you don't know very well? And I realized over the years that the methodology that I use for debugging is always the same. It doesn't matter where in the stack I'm looking. It doesn't matter what the language is. It doesn't matter whether I even know the language really. It's always the same methodology for debugging and it's very, very simple. So that's what this talk is about. Every good debugging session starts with this quote. This is a mantra among programmers. So someone, maybe it's your boss, maybe it's a user, maybe it's a friend, comes to you and they report a defect in something and you pull up the code that you think is the offender and you stare at it and you're like, I don't understand how this is possible. This can't be possible. This can't be happening. And you reread the code and you read the code and you read it over and over again. You try to understand how it's possible and you keep saying this, right? We're gonna come back to that. So, by the way, there's no Ruby in this talk, so sorry, but not sorry. So this is a true story about a debugging session that I engaged in a few years ago. I'm from Toronto, Canada. I have a friend from my hometown who was running a PHP site and he called me up one day and he's non-technical. He had a staff of people who were working with him. I don't know where they were at this time but he called me up and he's like, hey, my site is down. And I'm like, okay, cool. So why don't you just get your team to fix it? And he's like, well, they're not here because of reasons. So he's like, can you fix it? So I didn't have a source code. Didn't know anything about the system, never seen the source code, never even really talked to any of his developers. Written in PHP, I had written PHP maybe like five years ago, very little familiarity with the language. I did happen to have SSH access to his servers because I had diagnosed some other thing for him at some point that was unrelated. So he's like, yeah, can you fix it? I'm like, I don't know, I guess I can take a look. So I asked SSH into one of his servers and I'm like, okay, well, he's probably running PHP under Apache. So I'll take a look in the Apache error logs because that's where I figured the PHP error logs would be. And of course, there's nothing in there, right? And it's funny because you might think that this is like sort of a worst case scenario. Oh no, the site is down, there's nothing in the logs. But the fact of the matter is that there's never anything in the logs. And even if there is something in the logs, you'll be really lucky if it's useful.  So, cool, what now? So this is what I did. I knew that the PHP code was probably executing in one of these Apache processes. So I found a PID for one of those Apache processes. Then I ran a program called Strace to attach to that running program and give me some debugging output. If you're not familiar with Strace, Strace is a program that will give you a trace of all the system calls that get executed by a program that you attach it to. So if you don't know what a system call is, system calls create the interface, provide the interface between user land programs, which are the kinds of programs that probably most of us in here write most of the time, and the operating system. So system calls are used for all kinds of things like writing to files or to sockets or allocating memory or all kinds of services, essentially, that the operating system provides to user land. Strace output looks like this. So basically what Strace does, very simple little program, is that it captures the system call information using a kernel API and then reconstructs in ASCII text those system calls to look like C function calls. So you have the name of the function, arguments and parentheses, an equal sign, and then whatever that system call happens to have returned. In this case, we're writing to file descriptor one, which is standard output from a buffer, which is in this case a C string that says hi and has a new line character at the end of it. The third argument to write is the number of bytes to write from that buffer to the file descriptor. And then the return value is the number of bytes that got written successfully to that file descriptor. Most of the system calls that you're probably gonna, that are probably gonna provide useful information to you when you're debugging like a Ruby program or something like that are gonna have really simple names like write or open or read. But if you get confused about what a system call is, you don't know what it's called by name. Some of them have some really, really obscure names that probably won't mean anything to you if you've never done this kind of programming before. They're all documented in section two of the manual. So it's really, really easy to find them. Man, space two, and then the name of the system call and most of them are documented pretty well. I've taught a lot of people how to use Strace and this is usually where it kind of falls down. So you attach Strace to some process and you're like, all right, I'm gonna find a bug.  I've seen many megabytes of Strace output for like a small number of requests on a web server.  But it turns out that there's actually like a really, really straightforward methodology for finding the causes of problems in Strace output. The first step is, well, first of all, you have always have to work backwards. So work from the bottom and go up. The first step is to try to find where the failure is actually being reported. So in this example, this is Apache writing a 500 HTTP response back to a socket, socket number 12, presumably. And so you know once you find the error being reported that probably everything beneath that is not very interesting to you because obviously the cause of the failure happened before the failure got reported, right? And then work back up and usually if you're gonna find the cause of your bug in the Strace output, it's gonna be relatively close to where the error actually gets reported to the client or to wherever it's being reported to. So in this case, we work back up. We find this failing call to open. There's a file called var slash www slash db.in.php that's missing and then we get a 500 error right afterwards. Okay, starting to form a hypothesis, like maybe someone typoed that file and they deployed bad code or I don't know if they edited the code right on the server, I don't really know how that works, but there's a sort of a hypothesis forming, right? And so you can slowly work backwards from there in the output until you find something that looks like it may be the offender, right? And so there's just above that, I don't know if you all can see the green, but just before that failing open call, there's a successful open call to var slash www slash index.php. And so you can imagine, you hit the root of the site, Apache attempts to load a file called index.php, which has a typoed included in it and that's causing the 500 error. That's a sensible hypothesis for what's causing this outage. So then try to prove your hypothesis. So look and see in the index.php file, are we attempting, does our hypothesis sort of, does the first test of our hypothesis prove true? Yes, we are attempting to include something called db.in.php. Then look to see if that file's there. Is that file actually there? Maybe the permissions were wrong. Turns out that file is not there, but there is a file called db.inc.php. So that makes sense. Someone, there's bad code on the server, that's what's causing the 500 error. Next step is to fix the bug and then, you know, feel good about yourself. So I think that the total time that it took me to fix this outage from the time that my friend in Toronto called me until the time that his site was back up was like three minutes. And I felt pretty good about myself and he was really impressed. He was like, wow, how did you do that, right? So not like he, you know, it's not like he sent me flowers or anything, but he seemed appreciative. I would have liked some flowers, but you know, later that night I started reflecting on that debugging session. I was like, why was that so effective? Like I never find bugs in my own code that quickly, right? Like when it's my code, something stupid like that takes me like an hour to find or longer, right? I'm like searching through files, trying to see the error. And I realized that it's because when you come into a debugging session with all these assumptions, they usually lead you astray, right? If your assumptions were right, you probably would have written the right code in the first place, right? And then there wouldn't be a bug. So that's the zeroth rule of my formula for how to debug anything, which is forget everything you think you know because it's all wrong. And the first rule follows from that, which is to get a third-party opinion. So if you don't know anything, if you're blind, then you need to ask someone for help. You need to ask someone for some information about what's actually happening as opposed to what you think is happening because if what you thought was happening was right, then there would be no bug. So in this example, and mostly in this talk, I'm talking about this tool called Strace. It's very, very useful, extremely useful for debugging programs on Linux. It's like such a great first thing to look at, but there's a whole bunch of other ways to get third-party opinions. This is a great diagram. It's a little bit intimidating, but a lot of these tools, depending on what kind of thing you're trying to debug, can be very, very useful, and many of them are worth learning, if not all of them, depending on what kind of software you actually write and try to debug. And I'm gonna put these slides up online so you can look at this diagram if you want to. There's also other ways of getting third-party opinions. For example, if you suspect that the bug might be in the operating system, finding another program that does what your program is supposed to do, and running that and seeing if you get the same behavior might be a way of sort of making a first step toward confirming that the bug is in the operating system or in another layer rather than in your program. So that can be a very useful technique as well. And I'm sure there are other ones that I haven't thought of or that I've never used before. So the next bug I wanna talk about, it's kinda debatable whether it was a bug in package cloud or a bug in app, the package manager. But this was an interesting debugging session that lasted way too long. It started when we had a customer who tried to install a package cloud repository on the latest Ubuntu. And I don't know if you can see this output, but beside many of those URLs are the three letters, IGN, which means ignore, which means that apt couldn't find anything there, the request failed, something like that, so it's ignoring those files. And many of these files are like critical files so that the package index wasn't working, right? Now this package index was working on every other version of Ubuntu, every other version of Debian we hadn't gotten around to testing on the latest Ubuntu yet. So we were like pretty confused. So after staring at our own code completely uselessly for a while, pull out Strace. And this is a different way of invoking Strace so that the last way that I showed in the last example, I was attaching to an existing process. With this way, you can actually start a process underneath Strace and get all of the output from that process. And the output from this was really long. It was like a couple of megabytes, so it was a lot to decipher. But using our trusty methodology, work backwards to find a failure. So this is apt writing to standard output, what we saw, so ignore. And then this is a local copy of package cloud, so it's like this local VM IP address at the port 3000, it's a Rails app. And then trusty, which is the distribution and then the name of the file that that app was failing to find. So then we started working back up from there. And we found this line, right? Which looks like, if you can't read it, it says read six and then a long string that says 400 URI failure. And then the URI is assigned S3 URL, that's we redirect to those in package cloud. And then after that, a new line and it says message colon bad header line. Okay, so it seems like S3 is returning a 400. That's kind of odd, wonder what's up there. Try to confirm the hypothesis and make a curl request to that same exact signed S3 URL and get back a 200. Cool. So here we have a case where what apt is reporting seems to disagree with what's actually happening. And I didn't have a space for it in these slides, but we actually ran a TCP dump, which dumps out all the network traffic from that request to confirm that apt was in fact receiving a 200 from S3. So what now? Well, this is where things start to get a little bit more real and you have to actually download the source for whatever you're trying to debug and try to figure out how that thing works and where the problem is. Now this step is actually a lot harder than it might otherwise sound. Knowing where to find the source for packages that are installed on your system, depending on what flavor of Linux or whatever operating system you're using might be a little bit trickier than it sounds. And I've had a lot of late nights and early mornings that were caused by me thinking that I was debugging a version of the source code that was running on my computer, but it turned out to not be even remotely similar versions. Distributions like Red Hat, for example, heavily patched source code. So the version number that is on the package could be completely different from the actual source code that they compiled to build that package. So if you do an open SSL version from the package version that gets installed from the Red Hat vendor package repos, it will look vulnerable right now, but it's actually not because they maintain their own set of patches. If you're on an app-based distribution, app gets source and then the name of the package will unpack the actual source that was used to create that exact package that's on your system into your home directory. So this is really, really useful and it's worth knowing for whatever platform you deploy on. Now, app is like a lot of lines of C++, more lines than it's not conceivable that we could just enter the source directory even if you're the best C++ programmer in the world and just find the bug, you need to find a starting point in that code base, especially if you're unfamiliar with the code base and especially if you're unfamiliar with the language. So the key here is to locate some kind of hook, some kind of string or sequence of bytes that you think might be hard-coded into the source code. So in my case, I was kind of guessing that this error message bad header line was probably somewhere in the app source code and that proved to be true. So it's contained in a bunch of these translation files that perform kind of like internationalization for apps. So it's translated, works in a bunch of different languages and then it's also in this C++ file. So this is where it gets a little tricky, especially if you don't know C++. But the fact of the matter is, if you can read Ruby Meta Programming, I would venture a guess that with enough effort or with a small amount of effort, you can understand a few C++ methods. If you stare at this for long enough and it did take us a while, you'll see that it's looking for malformed headers or what it believes are malformed headers. Now taking one step back from there, when you first read this code, you're like, wait, apt implements its own HTTP client? That's kind of weird. Turns out it does. And it turns out that the way that it processes headers is a lot stricter than most other HTTP clients. Probably because a lot of other HTTP clients have been made a lot more relaxed over the years of the protocol being so popular and lots of misbehaving HTTP servers in the wild. But apps is so specific that its HTTP parser is just way stricter than everyone else's. So basically what this is looking for is a header that HTTP headers are the name of the header, a colon, the value of the header, and then a new line. And this is looking for headers that have no value. So name, colon, and then new line. Turns out if we look back at our curl, maybe you can't see it there, but there is a header, an empty header, the content type header that was causing this thing to trip up and report this error. We fixed it by actually setting content type on all of our S3 resources, which is probably a good idea anyway, obviously. Cool, so the bug is fixed. So, rule two, locate the correct source code. Easier said than done. And if you're deploying software on a platform, learn how to do that. It won't take that long to figure out. And knowing how to find the correct source code will save your ass, I guarantee it. Identify a hard-coded string or some way, some hook that you can use to find a starting point in the source code from which to work. So this is really important because if you like, I remember one time I was debugging in MySQL, it's, I don't know, two million lines of code or something like that. If you don't have a starting point, you're not finding anything, period. If debugging is a funnel, if we think about it like a customer acquisition funnel, I think step four is where probably most people drop out of the funnel. They come to some code that's written in some language they're not familiar with. They're a Ruby programmer and they come upon some C or some C++, but the reality is that with enough effort, you can learn this stuff. And it's really not that much effort. It's a lot of these code bases, especially if you follow a good methodology for reading through them, are not that hard to understand, particularly if you're trying to find and understand some small defect in them. I would encourage everyone to not to fall out of the funnel here, to dive into code bases and languages that they don't know because that's how you learn. A lot of people ask me like where to start learning C or where to start learning about systems programming or stuff like that. And the answer is that debugging is a really, really great way to sort of get your feet wet in that stuff. Hopefully you get to this step. If you get to this step, that's a good time to have a beer. Fix whatever's broken. So those are my steps for how to debug anything. Forget everything you know. Get a third party opinion. Locate the correct source code. Identify a hook. Stare at the code until it makes sense. Maybe learn a new language in the process. And then fix whatever's broken. Questions?