Bill Buchanan - Just Git ... and Smashing Windows

ASecuritySite Podcast - Un pódcast de Professor Bill Buchanan OBE

Categorías:

There’s one little program that I could not do my work without … Git. And, so, our digital world needs to say a great thanks to the wonderful Linus Torvalds. In fact, without him, our digital world would be a whole lot more locked-down and controlled by large and faceless companies. Without Linus, we would probably now be dominated by Microsoft Windows, and your car and your mobile phone would probably be running Windows for its interface (yuk!). And if the software in your car crashed — as it would likely do on a regular basis — you might possibly have to connect a keyboard to your instrument panel and press Ctrl-Alt-Del. Your TV, too, would possibly boot up into Microsoft Windows, and you’d need a mouse to control it. And our world of servers would possibly mainly be running on Microsoft IIS and use MS SQL databases. And, to back up your code, you would need a licence for Microsoft Backup 3.1, and where you dragged your folders over to make updates. Possibly, the command line terminal would have been dropped in favour of GUI (Graphical User Interface) approaches. So, just as in the famous advert from Apple in 1984 which illustrated the smashing of a Big Brother screen, Linus smashed the world of Windows — sorry for the pun! https://www.youtube.com/watch?v=2zfqw8nhUwA And, so rather than a world of Microsoft Windows, our world is full of Linux and associated distributions. For this, he wrote the first version of the Linux kernel and wrote the original version of Linux with pure machine code. I suppose there is something in the DNA for the Finnish people, that wants to be open about things, and not close them down with patents and restrictions. Git So, while the creation of Linux is possibly one of the greatest advancements in Computer Science. There is something even better … Git. With Git we have a version control system of code and documents. I use it every day, and it saves me so much time and effort. I use it in so many ways, including archiving my code and updating my Golang libraries. At its core is a smart way of keeping track of any version of a file and the difference between them. Linus wrote Git in 2005 for his Linux kernel but is now maintained by Junio Hamano. At its core, each host maintains a complete repository of all the files it has archived and how they have been modified. This differs from the client-server-based approach of code repositories, as the tracking can be done independently from a server. With Git, you end up with some commands that are hard-wired into your memory. We use “git add .” to add new files, then “git commit -m ‘New update’” to search for changes in the files, and then finally a “git push” to upload the new versions. Then a “git pull” to get things back. Anyone who has ever lost their code or created a bad version will know the power of using Git to recover things. Three basic commands are thus: git add .git commit -m "My new update"git push But, it’s not just code it can archive; it can archive many different document types, and it particularly likes mark-up documents such as LaTeX. Overall, Microsoft Word is terrible for version control, as the file is encapsulated in a Zip file. Many developers thus use LaTex and archive with Git. The great advantage of this is — just like Wiki’s — we can trace the updates through text. It also allows us to easily share documents and allow collaborative work (as Git can keep a track of the update). And, for large files which are more than GBs in size there is Git Large File Storage (LFS) — git-lfs. And, so, if we were to start the Internet again, possibly LaTeX and Git would be used to create our documents, and we would have no Microsoft Word. In fact, we would probably not need Microsoft Windows, as our world would be open-sourced with the use of Linux. While Linux has always struggled to compete with Microsoft Windows and Mac OSX, it is open and free. The code for Linux, too, is open to all to examine and update. People often maintain open-source software as they have a real belief in its power and in how it frees us from the dominance of large and powerful companies. Not just for source code There are so many use cases of using Git that are not just versioning code. For my own teaching, I use Git to push my PowerPoint slides, source code and labs. Students can easily download the whole module at the start of the course and thus just to a “git pull” for any updates. Students, too, can mark typos in the material. You can find this at: https://github.com/billbuchanan/appliedcrypto Another interesting example is the District of Columbia and which publishes its laws through Git. This allows everyone involved to keep track of changes in the law and also spot errors and typos. If you are interested, the laws are marked up with XML and available at:   https://github.com/DCCouncil/law-xml This, though, is the definitive source of the law, and not a copy from another system, and where a “pull request” allows someone to update a document, and then for the maintainer to review and change, if required. Conclusions To, me, Git is the one tool I could not do my work without. I love it, as I don’t need a fancy GUI, I just drop down to the console and let my fingers to the walking. And, so, just like smashing Big Brother, Linus smashed a closed digital world and free us from the control of software. If we were to start the computer and software industry again, it would be Linus’ route we would take and not the closed-source world of big business. If not for Git, we would probably be using Microsoft Backup 3.1 and dragging our files from one place to the next.

Visit the podcast's native language site