Wiki

From Coder Merlin
< Wiki
Revision as of 14:47, 2 January 2022 by Chukwuemeka-tinashe (talk | contribs) (Created page with "{{MerlinMultipageExperienceAll}}")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Experiences

This wiki, perhaps in conjunction with a guide, will take you, an explorer, on a journey through a series of experiences in Computer Science. Each experience is contained on a wiki page titled for the subject of the experience. Additionally, experiences have a numeric experience code that begins with the letter "W". This page, for example, can be accessed either by entering the title of the experience (Wiki) or entering the experience ID (W1001) in the search bar.

Experiences will generally begin with some background information, and then it'll be time for you to get your own feet wet by digging in deeper. The icons below will be helpful for you to understand:

Key ConceptsKeyConceptsIcon.png
This box will describe a summary of important concepts that you should thoroughly understand by the time you complete the experience.


Hint.pngHelpful Hint
This box will describe a helpful hint that you'll likely find useful.


ObserveObserveIcon.png
Observe, Ponder, and Journal: : Section 1

This box will contain items that you should closely observe and ponder. Most such boxes will be labeled with a section number and one or more questions. For example:

  1. Why do you think section numbers begin with the number one?

You're expected to document your answers to these questions in your Digital Journal. You must consistently label each entry with the section number, a period, and then the question number. For example, when answering this question, the identifier would be 1.1

You'll learn more about Digital Journals in Digital Journal. Until then, you'll probably find it helpful to document your answers on paper or digitally using your favorite text editor.


ExercisesExercisesIcon.png

This box will contain a list of exercises that you need to perform to best master the subject matter of the experience. You will go through several different types of exercises. Some will be included on the page (perhaps in the form of a quiz) but more often, exercises will require you to perform some puzzle solving or other work on the server.


CautionWarnIcon.png

This box will contain information about items that are critical for you to understand; a failure to understand these concepts could result in undesired consequences.


Going DeeperGoingDeeperIcon.png

This box will contain supplementary material that is not essential to understand yet could be intriguing for you if you wish to understand at a deeper level.


ComingSoonIcon.png
Coming Soon

This box will contain topics that will soon be added to the wiki.

Conventions

  • In most cases, the case of characters matter. "begin" is different from "Begin" and "BEGIN". Be sure to use the correct case.
  • Keys will appear within a keyboard key image. For example, if you are told to press RETURN the intent is for you to press the key labeled RETURN (or ENTER), not to type the characters R-E-T-U-R-N.
  • Key combinations will appear as two adjacent keyboard keys, separated by a hyphen. For example, CONTROL-c means that you should press and hold the CONTROL key, then press the c key, and then release the CONTROL key.
  • Several different types of assessments and exercises are used. You'll notice that each experience is identified by the letter "W" followed by a numeric experience code, i.e., Wnnnn or Wnnnn.mm. Regardless of the type of exercise, the nnnn will always match that of the experience.
    • Experiences from the wiki that aren't part of the  Merlin Mission Manager  (you'll learn about this in experience W1008) will be labeled as Xnnnn
    • Excursions from the wiki that aren't part of the  Merlin Mission Manager  will be labeled as Cnnnn
    • Labs and assessments (quizzes and tests) that are part of  Merlin Mission Manager  will be labeled as Mnnnn
    • Reflections in the form of a journal (you'll learn about this in experience W1005) will be labeled as Jnnnn
    • Reflections in the form of an essay will be labeled as Ennnn

Expectations

Engineers (and engineers-to-be) are expected to be life-long learners, and students are expected and required to take initiative to research topics beyond what is provided in these pages. This skill is essential for survival in both the academic and "real" world.

A very helpful article about taking notes is available from Scott H. Young, here.

Why Learn Linux

If you are scrolling through this article in a web browser, your experience is made possible via an operating system (OS). You may have seen this acronym, OS, around, particularly if you are an Apple consumer--it's the OS in macOS and iOS. Operating systems also power supercomputers and servers that make transmitting data or information possible. The OS sits between the hardware of your computer or mobile device and the user and software. There are many operating systems available to the public: Microsoft Windows, macOS, and Linux to name a few,[1] and Linux is actually the operating system maintaining Wikipedia's and Coder Merlin's servers.[2] But that is only one of the places you can find Linux working behind the scenes. The ubiquity of Linux is one of the many reasons that it is such a powerful choice of OS.

Role of an Operating System

Origins of Linux

On August 25, 1991, Linus Torvalds, then a student at the University of Helsinki studying computer science, emailed a Minix--a Unix-based operating system--newsgroup about a free operating system he was working on, that would become the open-source software that is now called Linux.

Linus Torvalds
Linux Logo

From: torvalds@klaava.Helsinki.Fi (Linus Benedict Torvalds)
To: Newsgroups: comp.os.inix
Subject: small poll for my new operating system

Hello everybody out there using minix-I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386 (486) AT clones.
— excerpt from an email sent by Linus Torvalds[3]

Despite Torvalds' message, Linux would become ubiquitous in the world of computer programming. Torvalds released the first version of his operating system--built with his original Linux kernel--version 0.01 on September 17, 1991[3], and Linux has continued on to power every aspect of online life since then.

From Unix & Minix to Linux

In his autobiography, Just for Fun: The Story of an Accidental Revolutionary, Linus Torvalds recounts how he became interested in computers and operating systems in particular. When Torvalds was a high school student, he saved up money to purchase a Sinclair QL computer in 1987. Torvalds became dissatisfied with parts of the Sinclair QL, especially the read-only operating system--he could not change or customize it.

Once in University, Torvalds switched over from the QL to the PC, which by 1990 was cheaper than other options and due to mass-market production, was more standardized. In 1991, the PC Torvalds purchased ran on a Minix operating system, a variant of the Unix operating system created by Andrew Tanenbaum. Unix was developed by AT&T's Bell Labs in the late 1960s, based on certain design principals, and by the early 1990s, Unix was the most used operating system for supercomputers and servers. In his book, Torvalds extols the beauty of Unix's cleanliness and simplicity, and the "small-is-beautiful philosophy."[3] In his 2003 book, The Art of UNIX Programming, Eric S. Raymond, abstracts 17 core principles exhibited by the Unix operating system including the "Rule of Modularity: Write simple parts connect by clean interfaces...[and the] Rule of Simplicity: Design for simplicity; add complexity only where you must." [4]

Due to Torvalds' frustration with Minix's terminal emulation, he started the project that would become Linux as a terminal emulator. The Linux kernel differed from the Bell Labs' Unix kernel since the Linux kernel started the Bourne-Again Shell (bash) first rather than the init program. Additionally, Torvalds' implementation of Linux departed from Tanenbaum's Minix in that the Linux kernel was a monolithic kernel rather than a microkernel.[3]

What is Linux?

A Kernel vs. An Operating System

The origins of Linux involved a number of players as well disputes about attribution and naming. To understand on a high-level the controversy surrounding what "Linux" refers to, it is important to distinguish between a kernel and an operating system.

Computer Layers, including Kernel and OS

A kernel is the core of any operating system. The kernel mediates between the hardware of the computer, and the processes or software that the computer runs. The kernel has a number of important functions, including process order and memory management. The operating system includes the kernel and other low-level applications that allow a computer to run.[5][6]

When Linus Torvalds created an operating system in the 1990s, he created, and is widely credited for, an original kernel--the Linux kernel--and then patched in several free, open-source software programs to create a functional operating system. However, since then, the term "Linux" has been used to refer to both the kernel, the operating system, and additional operating systems based on the Linux kernel.[6][7]

GNU & Richard Stallman

Torvalds himself ruminates in his autobiography about the qualms he had about selling Linux, as he recognized his operating system was made possible due to the free code and software made available under Richard Stallman's GNU General Public License (GPL). In particular, Torvalds used the GNU Compiler Collection (GCC Compiler) and the Bourne-Again Shell (bash).[3]

Richard Stallman (RMS) has been dubbed "the God of Free Software" and began the Unix alternative, GNU (GNU is Not Unix), in 1983. RMS also wrote the GPL that Torvalds would use for Linux.[3] But RMS continues to vocally object to the use of "Linux" in reference to Linux-based operating systems, insisting that the original operating system that Torvalds developed was mainly GNU software with a Linux kernel, and therefore should be referred to as "GNU/Linux." Additionally, RMS focuses on the fact that the kernel was the main piece missing in the GNU operating system, and RMS has referenced Torvalds' admitting that had GNU had its own kernel, he may not have developed the Linux kernel. Despite RMS' and others' objections, many continue to refer to Linux kernel-based operating systems simply as Linux, with no attribution to GNU.[7]

Continued Linux Development

As Linux is open-source, there is a vibrant community around it. Various operating systems based on the Linux kernel have been created since Torvalds released the first. These Linux-based operating systems are called Linux distributions or distros for short. Common distros include Ubuntu and Debian.[8][9] To this day, Linus Torvalds continues to work on the Linux kernel as a fellow at the Linux Foundation.[10] All of the code is available on his GitHub @torvalds.[11]

Reasons to Learn Linux

The Ubiquity of the Linux OS

Perhaps the most important reason to learn Linux, is that it is everywhere. Linux is the operating system behind every Android device and some e-readers. Linux powers Facebook, Google, Wikipedia, and other major websites that millions of people use every day.[12] The Linux Foundation, a non-profit organization focused on developing open-source technology and the growth of Linux in particular, even founded an Automotive Grade Linux (AGL) working group, consisting of leading automakers, engineers, academics, and more, to create and advance open-source technology in the automotive industry.[13] Even Microsoft, which runs a competing OS, Windows, uses Linux to power its cloud computing service, Microsoft Azure.[12] According to the Linux Foundation website, 100% of supercomputers run on Linux. Needless to say, Linux almost invariably is a part of the lives of every person who uses the internet.

Open-Source, Skilling Up, and Community

Since Linux is open-source and under the GPL, users can freely share, modify, copy, (and sell) versions of the Linux software, and as a result, as with many other open-source communities, there is a robust and vibrant online community dedicated to developing and troubleshooting Linux.[9] To name a few, there is Linux.org, The Linux Foundation, the Linux subreddit (r/linux), StackOverflow, the Unix StackExchange, and LinuxQuestions.org.[14]

As illustrated earlier, partially because Linux is open-source, Linux is used by countless companies for various purposes. As such, Linux is also a highly sought-after skill when applying for jobs. According to the Linux Foundation's 2020 Open Source Jobs Report, 74% of the hiring managers surveyed listed Linux as the most in-demand skill, and 93% of the hiring managers said it was difficult to find potential hires with sufficient open-source skills.[15] Additionally, the default shell for Linux operating systems is still bash, which is another highly in-demand skill in the tech community.[16]

Security

Given that Linux is both open-source and highly used, if there are any security threats, there is a group of skilled developers and companies ready, able, and incentivized to neutralize the threat.[8]

Get Started Learning Linux

Coder Merlin began due to the efforts of an individual, whose goal is to provide accessible quality computer science education for students, primarily in high school. As such, using an open-source operating system to run remote servers aligned with the mission of the wiki. Linux cuts costs, and will also give students the opportunity to learn how important and useful a community of users can be to education. Beyond the Coder Merlin community is the entire Linux user base. Any query a student may have will be met with an answer either on the Coder Merlin site, or in an online forum or discussion group. The open-source philosophy mirrors that of accessible education--it should be free; it should be shared; it should be protected and proliferated. By using Linux, Coder Merlin creates an opportunity for students to gain first-hand experience using bash and other Linux software.

In order to access the remote Coder Merlin account, you need to SSH into the server using a secure shell client. If you are using a Mac operating system, then you are already using bash. If you are using Windows 10 or later, you also have bash available to you. More importantly, the remote Coder Merlin server is a Linux server, so once you have connected into it, you will be using bash and other software in a Linux operating system![17] All of the exercises and journals that you work on and update will be done using Linux-based software and commands. By learning with Coder Merlin, you are then gaining valuable hands-on experience with two top job skills in the tech community--bash and Linux. Beyond Coder Merlin, you can find a variety of resources online, as discussed above, due to the open-source nature of Linux. Happy learning and coding!

Key Concepts

Key ConceptsKeyConceptsIcon.png
  • What is Linux?
    • Linux is a kernel developed by Linus Torvalds in the 1990s and also refers to the operating system he developed at the time. Linux has also become synonymous with the family of operating systems based on the Linux kernel.
      • There is some debate in the community about whether it is appropriate to refer to the family of operating systems based on the Linux kernel as "Linux" because Torvalds' and subsequent operating systems using the Linux kernel borrow a lot of GNU software, such as bash and the GCC Compiler.
      • Richard Stallman (RMS), the originator of GNU, in particular, has been vocal about referring to only the kernel as Linux, and the family of operating systems as "GNU/Linux."
    • Kernel vs. Operating System: a kernel is the core of an operating system, which is the various software programs that allow the user and other software to interact with the hardware of a computer
  • What is open-source software?
    • Linux is an open-source software program under the GNU General Public License.
    • RMS wrote the original GNU General Public License (GPL), which has allowed a number of software programs to be freely and widely used since its inception, including Linux.
    • Due to the nature of open-source software (it is free and shareable), much of it, including Linux, has developed a robust community, which comes together usually around online forums, to troubleshoot, learn, educate, share, and secure the software.
  • Why learn Linux?
    • Linux is everywhere. Linux-based operating systems run most major websites (Google, Facebook, etc.), all Android phones, cloud computing, supercomputers, etc.
    • Linux is an in-demand skill for hiring managers in the tech industry.
    • Linux, due to its open-source community, is a highly secured operating system. Security threats can be neutralized quickly and effectively by its large and active user base.
  • How to learn Linux?
    • Using Coder Merlin is a great start, as the Coder Merlin remote server runs on Linux, and in order to access exercises and journals, you will need to SSH into the Coder Merlin server, and start using a Linux operating system!

References

Why Learn Swift

Swift Logo

When you first become interested in learning how to code, it can be overwhelming when you discover how many languages are out there. This article touches on just a small portion of computer history and, in doing so, provides background on a few coding languages. It can be difficult to feel secure in your choice of a first programming language. After a basic first Google search, you will see Python, Java, Ruby, and Swift as suggested languages. There really are no wrong choices when learning, as long as you are widening your scope of understanding. This article gives some history and logic behind choosing Swift to add to your software tool belt.

Origins of Swift

Beginning with C

Example Car Class
The C Programming Language,2nd Edition

Like other technologies and inventions, a lot is owed to predecessors. In the world of computer science, many consider C to be one of the most powerful and important programming languages. This is because of its influence since its inception in the 1970s and 80s.[1] As of November 2021, C still ranks #2 in the TIOBE index.[2] C is still widely used and relevant in day-to-day life—the MacOS kernel, Windows kernel, Android kernel, and Linux kernels are all written in mostly C. C is also the closest among modern programming languages to machine language. It is still high-level enough to be relatively easy to learn.[3] Additionally, C's syntax and structs have directly influenced some popular higher-level programming languages, including C++, C#, Objective-C, Python, Java, Javascript, PHP, and others.[1] As a replacement of Objective-C, Swift can also trace its programmatic origins to C.

Bell Labs, Unix, & Objective-C

In the 1970s, the team at Bell Labs was seeking to create a new programming language to for the developing Unix operating system (OS).[4] One programmer, Ken Thompson, developed the language, B, based on BCPL, a now obsolete language. Dennis Ritchie, also part of Bell Labs, created C by adding structures to B, allowing Bell Labs to write the Unix OS.[1] The Unix kernel was written in C, and throughout the 1980s, C grew in popularity, as did the Unix operating system.[5]

In the 1980s Objective-C was developed as a superset of C—i.e., Objective-C contains all of C's features AND has additional syntax for classes and methods.[4] Brad Cox and Tom Love developed Objective-C in the 1980s. They were intrigued by the ideas from Smalltalk, from Alan Kay's team at Xerox, where programming was data-centered, grouping information as objects, and actions carried out on the objects would be called methods. Additionally, Smalltalk programs could execute methods in realtime and, therefore, could take user input. However, Cox and Love wanted to use a Unix system and admired how quick and efficient C's programs could be. They developed Objective-C to combine the qualities they desired from both C and Smalltalk.

NeXT logo

NeXT, the predecessor to Apple, licensed Objective-C from Cox's and Love's company, Stepstone in the late 1980s. In 1996, NeXT bought the rights to Objective-C from Stepstone. Objective-C was further developed to meet NeXT's and then Apple's operating system needs. [6] Then, Apple launched Swift in 2014 to eventually replace Objective-C.[7]

What is Swift?

Apple logo black

Apple "Replaces" Objective-C

In 2010, Chris Lattner, a software engineer at Apple, began creating another programming language that would improve on and be able to integrate with Objective-C. In 2014 Apple introduced Swift as a syntactically smoother and safer option to eventually replace Objective-C. At the time Objective-C was the primary language for developing Apple operating systems and its apps[4] When Lattner and Apple released Swift in June 2014, they also released Swift Playgrounds, an app that serves as an educational tool and development environment for Swift. Playgrounds allowed new users to explore Swift and enabled Apple to demonstrate how easy Swift was to pick up.[8]

A Safe, Fast, and Modern Programming Language

When looking at Apple's official page on Swift, the language's characteristics most advertised come to the fore quickly. Apple describes Swift as "Modern...Designed for Safety...Fast and Powerful...Open Source" and easily adoptable for macOS and iOS development because of its ability to coexist with Objective-C.[9] When explaining Swift's modernity, Apple describes clean syntax, devoid of required characters that denote the end of lines, automatic memory management, and support of emojis and various foreign languages. Regarding safety, Apple adds that all variables are always initialized before they can be used.[9] Swift has been described as "a type-safe and memory-safe language."[10] This means that Swift was written and designed to prevent common bugs and memory problems from occurring, without the same level of vigilance required from the programmer when using C, Objective-C, or other languages.[10]

Reasons to Learn Swift

Open-Source (& Apple) Community

Just like Linux, Swift is an open-source software. This means that, like other open-source technologies, a variety of people—developers, product managers, companies, etc.—can troubleshoot and resolve any issues or security breaches that arise. Additionally, a community exists to help beginner coders and new Swift users acclimate and kick-start their journey with Swift. Furthermore, having the backing of a major tech company like Apple is an added benefit; it provides a community that already uses the language every day.

Apple Infrastructure & Intentions

Since Swift originated at Apple, the language was designed at the same time as accompanying tools and apps, such as an integrated developer environment (IDE), debugger, and more.[8] Apple, on its official Swift page, writes that Swift "was designed to be anyone’s first programming language" and links to free Swift curriculum that Apple created for educators and a free student-friendly app designed to learn how to code, and how to code in Swift specifically.[9] The app, Swift Playgrounds, mentioned earlier, is available on iPad and desktop. It lets the user write code directly in the app without needing to recompile or restart the program. The animations makes it accessible to students of all ages. The goal-oriented nature of the app makes it engaging for adult users too. Playgrounds illustrates how fast a language Swift is, outpacing Objective-C greatly.[8]

Professional Development

The ubiquity of the iPhone, iPad, and Apple's products creates an immediate incentive for companies to provide Apple-friendly mobile versions of any applications they run. This, in turn, creates the need for developers who can create mobile apps using Objective-C, and now using Swift as well.[8] Building an iPhone app can also be a great way to begin a portfolio as a student applying to colleges or internships.

Get Started Learning Swift

Coder Merlin is provided to promote accessible quality Computer Science education for students, primarily in high school. As such, starting students with a beginner-friendly, open-source programming language like Swift aligns with the mission and vision of the wiki. Much like the Linux OS that Coder Merlin uses, Swift provides students with access and practice for using an entire community of technologists beyond Coder Merlin. In addition to the free resources mentioned in this article—available through Apple—Coder Merlin also provides additional, tailored support and curriculum to help students in their journey through code. By learning with Coder Merlin, you are then gaining valuable hands-on experience with Swift, and can even develop your own macOS and iOS apps using what you learn. Whether Swift is your first, second, third, or nth language, happy learning and coding!

Key Concepts

Key ConceptsKeyConceptsIcon.png
  • What is Swift?
    • Swift is a modern language developed by Apple as an improvement to Objective-C, used mainly for iOS and macOS development.
    • Swift's predecessor, Objective-C, was built in the 1980s as a way to integrate object-oriented programming syntax into C.
    • In turn, C was developed in the 70s in Bell Labs for the Unix operating system.
  • Reasons to learn Swift
    • Swift is significantly faster than its competitors.
    • Swift is open-source and provides the support of an open-source community.
    • Having been developed by a tech giant, like Apple, Swift also benefits from infrastructure and support from Apple throughout its development, including curriculum and other educational resources.
    • Swift is used to develop iOS apps; therefore, it creates an opportunity for job skill and portfolio development.
  • How to get started learning Swift
    • Many free resources are available through Apple's website.
    • Anyone with an iPad or Mac can download the Swift Playgrounds app and get started coding Swift immediately.
    • Using Coder Merlin to learn Swift, Linux, and other software concepts is another free and easy way to kick-start coding.

References