text:
Free Knowledge Culture Calendar/October 6

Today in 1999 was the first release of DeCSS (version 1.1b). It contained the decryption algorithm for the Content Scramble System and a decryption key extracted from the Xing DVD player software. Its source code was leaked a little later and helped write libdvdcss which cracks the copy-prevention system and allows DVD-Video playback on free operating systems.


text:
Free Knowledge Culture Calendar/October 12

Today in 2001 the GPL-compliant patentleft Open Patent License was announced by the Free Software Foundation and FSMLabs.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Free Knowledge Culture Calendar/October 14

 Today in 1996 Matthias Ettrich announced the free “Kool Desktop Environment”, KDE.


text:
Free Knowledge Culture Calendar/October 16

Today in 2008 Remix: Making Art and Commerce Thrive in the Hybrid Economy by Lawrence Lessig was published.


text:
Free Knowledge Culture Calendar/October 17

Today in 2011 first code for the Open Observatory of Network Interference (OONI) was committed to the Tor Project’s git repository.


text:
Free Knowledge Culture Calendar/October 26

 Today in 2018 Microsoft took over GitHub, the monopoly for source code hosting with millions of users and projects. With the integration of Web 2.0 gamification features (“social coding”), with user profiles that include résumés and references, Github established itself as a self-promotion platform for developers. It was able to capitalize on the platform effect and user dependency. Combined with the convenience of its all-in-one service it managed to become the new monopoly for programming collaboration. “Code is on Github” became a standard and good style for code releases, to show that you are willing to follow developers instead of throwing some code over the wall. With platforms – like Amazon, Netflix, Android – at the center of entire ecosystems and often holding a monopoly position, selling people’s dependency on a platform has become one of the most profitable business models. The purchase is therefore an obvious strategic investment for Microsoft.


text:
Free Knowledge Culture Calendar/November 3

 Today in 2008 version 1.0 of the free video format Theora was released. It provided the world with a viable alternative to patent-encumbered video compression technology, but it was a step behind in terms of quality versus compression and therefore found only limited acceptance.


text:
User:MarqueIV

Just li'l old me, adding to the wonderful world of WikiBooks! :)

title: User:MarqueIV


text:
Free Knowledge Culture Calendar/November 10

Their interest is in protecting the software patent system that provides them revenue from Open-Source-driven reform. – Bruce Perens Today in 2005 the Open Invention Network, a patent non-aggression community, was founded, mostly by large technology companies.


text:
User:I'll eat ur kids

yo.

title: User:I'll eat ur kids


text:
History of wireless telegraphy and broadcasting in Australia/Topical/Biographies/Clifford Henry Yarburgh Gold

Clifford Henry Yarburgh "Cliff" Gold was a prominent amateur operator, amateur broadcaster, amateur club administrator in the late 1920s and early 1930s, then joined his uncle 4EG at Ted's commercial station 4GG. His station callsign was 4CG (4=Queensland, C=Cliff, G=Gold) and he operated from Brisbane, Queensland. A summary biography has not yet been prepared however the following resources have been assembled in preparation:
 * Transcriptions and Notes - Clifford Henry Yarburgh "Cliff" Gold - More than 50 transcriptions and notes
 * Photos, QSL cards and other graphics - Clifford Henry Yarburgh "Cliff" Gold - Nothing uploaded as yet


text: History of wireless telegraphy and broadcasting in Australia/Topical/Biographies/Clifford Henry Yarburgh Gold/Notes


text:
Free Knowledge Culture Calendar/November 18

Today in 1997 the first IEEE 802.11 Wifi standard was released. IEEE 802.11b was popularized in 1999 for local area networks in homes, cafés and workplaces (with Apple’s “Airport” routers and Macs and the “Wifi” branding), and later also for wireless community networks.


text:
Free Knowledge Culture Calendar/November 22

Today in 1454 Johannes Gutenberg printed his first dateable (and profitable) print product: one of thousands of indulgences. The ability to serve the religious market with masses of cheap print products was an impressive performance demonstration of the underlying movable-type printing technology. Although it was originally invented in China as early as 1040 A.D. (read: about 2,500 years earlier), this finally led to its widespread adoption which later also benefited dissemination of actual knowledge, serving the Renaissance and scientific revolution.


text:
Free Knowledge Culture Calendar/November 23

Today in 2005 the Free Software Foundation Latin America was launched.


text:
Free Knowledge Culture Calendar/November 27

Today in 1852 Ada Lovelace died at the age of 36.


text:
Free Knowledge Culture Calendar/December 5

Today in 1973 Serpico was published, a neo-noir biographical crime film on Frank Serpico who revealed widespread corruption in the New York City Police Department.


text:
Free Knowledge Culture Calendar/December 4

Today in 1995 the Comitê para Democratização da Informática aka. Center for Digital Inclusion was founded.


text:
Object Oriented Programming/Classes

In Object-Oriented Programming (OOP), a class is a sort of blueprint for creating objects. It defines a new data type that encapsulates data and behavior (methods) related to a particular entity or concept. Classes can serve as templates, allowing us to create multiple objects with similar characteristics and behaviors. Classes are essentially a giant container for a bunch of functions that can either rely on each other or independently operate within the class.

Components of a Class
A class consists of two primary components: attributes (also known as properties or data members) and methods (also known as member functions).

1. Attributes: Attributes are variables that represent the state of an object. They store information about the object's characteristics. In the animal analogy, attributes could include the,  ,  ,  ,  , etc. Attributes define what data an object can hold.

2. Methods: Methods are functions that define the behavior of the object. They represent the actions an object can perform. In the animal analogy, methods could include " ", " ", " ", etc. Methods define what operations an object can perform.

Most classes are made on their own python files and to be used or accessed by other python files. Being a class on its own page allows other python files to call and reference the class without directly affecting the code in the class. Classes can be used for calculating equations, registering user input and acting with it, and raising exceptions to other python files with, again, not being directly affected by other python files' codes.

Subclasses are essentially a child of a Class. Think of Classes as Parents, and Subclasses as Children. Parent Classes can pass properties or functions onto their Child classes. Or think of it as a Child inherits things from their Parent. Subclasses are for more complex programs that utilize multiple ideas under one grand idea.

Below is an template of creating a class in Python (or most other OOP languages), we use the  keyword followed by the class name and a colon. Within the class, we define attributes and methods. Here is an real example in Python of creating Animal class blueprint. This is a blueprint for all animals, called the "Animal" class, and it will contain common attributes and behaviors shared by all animals in the zoo.

In this class, we've defined attributes such as " ," " ," and " ." We also have two methods: " ", " ",. The methods are empty for now (marked with ) as each animal will implement them differently.

Now, we shall make a individual class  as followed:

As you can see In those classes, we use inheritance to inherit the attributes and methods from the Animal class. We then override the "make_sound" and "move" methods to implement the specific sound and movement behavior for each animal.

Now, we already create a Zebra class animals and we can now create individual animal objects and interact with them in the main program.

YouTube Tutorials

 * Python OOP Tutorial 1: Classes and Instances

title: Object Oriented Programming/Classes


text:
Object Oriented Programming/Properties

Properties in OOP are also able to be looked at as functions, a property houses a function that can have its procedures or variables altered without directly going to the code and editing it. A property can be changed or updated based on user input which allows for a lot of user-interactive programs and applications.'

In Python, the  keyword allows you to define getter, setter, and deleter methods for class attributes, making them act like properties. This enables you to control the access and modification of class attributes while providing a clean interface for external code. In example, we use the  decorator to create getter methods for each attribute, allowing us to access these attributes using

sss

title: Object Oriented Programming/Properties


text:
Object Oriented Programming/Getters and Setters

Getters and Setters (also known as accessor and mutator methods respectively) are two types of methods used to control the access and modification of class attributes (also called properties or member variables).

Getter
A getter method is used to retrieve the value of a private or protected class attribute. It provides read-only access to the attribute, allowing other parts of the program to retrieve its value without directly accessing the attribute. By using a getter, you can control how the attribute is accessed and apply any necessary logic or validation before returning the value.

In most programming languages, the naming convention for a getter method is to prefix it with " ," followed by the attribute name. For example, if you have a private attribute age, the corresponding getter method would typically be named.

Setter
A setter method is used to modify the value of a private or protected class attribute. It provides a way to update the attribute while enforcing any necessary constraints or validation rules before making the change. By using a setter, you can control how the attribute is modified and prevent any inappropriate changes.

In most programming languages, the naming convention for a setter method is to prefix it with the word " ," followed by the attribute name. For example, if you have a private attribute age, the corresponding setter method would typically be named.


text:
Object Oriented Programming/Private vs Public

Private vs. Public


text:
Object Oriented Programming/Abstraction

If you've ever made coffee using a coffee machine, you have probably experience abstraction. When you make your coffee, you make sure that there are ample coffee beans, you add water, add milk, and perhaps put in a fresh coffee filter. Then, you hit a button and a coffee of your choice is made. This is a good example of abstraction since the user doesn't need to be concerned about the right amount of milk needed for a specific type of coffee, or how many beans need to be ground up for the right amount, or what the temperature of the water needs to be, the user is only considered with providing the necessary materials to produce the final product. This same structure applies to object oriented programming. The user of the object should only be concerned with providing the necessary parameters for the final product and shouldn't really know or need to know how the object works internally.

Abstract classes and interfaces
In some languages it is possible to create a class which can’t be instantiated. That means that we can’t use this class directly to create an object – we can only inherit from the class, and use the subclasses to create objects.

Why would we want to do this? Sometimes we want to specify a set of properties that an object needs to have in order to be suitable for some task – for example, we may have written a function which expects one of its parameters to be an object with certain methods that our function will need to use. We can create a class which serves as a template for suitable objects by defining a list of methods that these objects must implement. This class is not intended to be instantiated because all our method definitions are empty – all the insides of the methods must be implemented in a subclass.

The abstract class is thus an interface definition – some languages also have a type of structure called an interface, which is very similar. We say that a class implements an interface if it inherits from the class which specifies that interface.

In Python we can’t prevent anyone from instantiating a class, but we can create something similar to an abstract class by using NotImplementedError inside our method definitions. For example, here are some “abstract” classes which can be used as templates for shapes:

Any two-dimensional shape has an area, and any three-dimensional shape has a volume. The formulae for working out area and volume differ depending on what shape we have, and objects for different shapes may have completely different attributes.

If an object inherits from 2DShape, it will gain that class’s default area method – but the default method raises an error which makes it clear to the user that a custom method must be defined in the child object:

title: Object Oriented Programming/Abstraction


text:
Object Oriented Programming/Inheritance

Inheritance
In many books, inheritance and OOP are made to seem synonymous, so it may seem strange that we deferred this discussion so far. This is a reflection of the diminished role of inheritance over time. In fact, one of the primary distinctions between Classic and Modern OOP lies in the usage of inheritance. As the old adage goes, if all you have is a hammer, then everything looks like a nail. And so it happened that often times, inheritance was the only tool available to the erstwhile OOP programmer, and so every concept under the sun (or at least the ghostly glow of a CRT) was crammed into inheritance. This lack of conceptual integrity and separation of concerns led to over-intimate dependencies and many difficulties. In some languages, programmer technique evolved to make the concepts clearer using the same limited language functions, while other languages explicitly developed features to address these concerns. Because you are almost certain to be exposed to some of this misguided advice at some point in your OOP learning, we'll try and explain some of the problems to you. However, much of the discussion will go in the sections where they properly belong!

First off, though, what is inheritance? Well, just like when your grandma dies and you inherit that gawd-awful ugly lamp, inheritance in OOP grants the child-class (or derived-class) all of the attributes of the parent (or super) class. So, for example (in C++):

Is-A vs Has-A Moley Baloney
The most over-used and rather worthless discussion on inheritance that you will see revolves around the "Is-A vs Has-A" discussion. For example, a car is-a vehicle but has-a steering wheel. The idea these authors are chasing is that your car class should inherit your vehicle class and have a steering wheel as a member. You might also run across examples with shapes, where a Rectangle is-a Shape. The point is, once again, abstraction. The goal is to identify operations that operate only on the abstract notion of vehicle or shape and then write that code only once. Then, through the magic of inheritance, you can pass in cars or rectangles or what-have-you to the generic code, and it will work, since the derived classes are everything the parent classes are, "plus more".

The problem here is that inheritance is mixing together several things: you inherit "typeness", interface, and implementation all at the same time. However, all of the examples focus on interface while talking about "typeness". The abstract code doesn't care that a car "is-a" vehicle, just that the objects respond to a certain set of functions, or interface. In fact, if you want to give your chair class accelerate, brake, turn_left and turn_right methods, shouldn't the abstract code be able to work on chairs then? Well, of course, but that doesn't make chairs vehicles.

The kinds of solutions proposed in these "is-a" discussions have thus been mostly replaced by so-called interface programming and template programming. Since template programming offers the loosest coupling, it focused some attention on the syntactic-semantic confusion. Just because you have functions with the proper names, does that mean that they do what you think they do? If a chair class has accelerate, brake and other vehicle type methods, does it make sense to have generic vehicle code work on this chair? This led to more codifying of the assumptions of generic code: say, brake(INFINITY) ==> STOPPED. This implies that brake(x) != accelerate(-x). So chair may make a better vehicle than the Starship Enterprise!

Delegation and "Dynamic Inheritance"
You will see more about delegation later in the section on message passing, but we wanted to mention that many problems solved by delegation are often tackled by inheritance in languages that don't offer a delegation feature. It's easier to show an example than explain, so in short, here's what delegation looks like:

Inheritance accomplishes a similar feat

However, the delegate can change over time, whereas base classes cannot. As a result, sometimes delegation is referred to as "dynamic inheritance".

Multiple Inheritance
Multiple inheritance is where an object inherits its properties from many different classes. For example, a house is both a "building" and a "place to sleep in".

In multiple inheritance, an object inherits its properties from many objects (its parents or base classes). Therefore, we need to set up some classes, which we will use C++ for:

In C++, to inherit all the types, one uses the : operator, like so:

Problems with Inheritance
One problem of Inheritance is that users of predefined classes may not know the location of the abstracted data. Therefore, it may not be easy for them to obtain it. Most of the problems with inheritance is due to design fragility or issues with the way a programming language implements it.

A normal issue in dealing with inheritance in large programs is called Fragile Base Class. It arises when subclasses of the base class make assumptions about the property (the definition of the attribute) that are outside the contract provided by the base class.

An example could be of an attribute that was declared in the base class as byte but later turns out to need the range of word. Changing this to word will necessitate at least recompiling all sub-classes but that might well not be enough because the sub-classes might have relied on the type of this attribute so that the source code also will need to be changed.

This intrinsic knowledge of the implementor about a given implementation is a problem in general programming but one that OOP/OOD does attempt to solve by offering greater opportunities for better programming practices. But as anything else with code it is up for the programmer to make use of it as to be as transparent as possible as to enable other to take full advantage of its code and so of the property of inheritance.

title: Object Oriented Programming/Inheritance


text:
Object Oriented Programming/Polymorphism

In programming languages and type theory, polymorphism is the provision of a single interface to entities of different types[1] or the use of a single symbol to represent multiple different types.[2]

The most commonly recognised major classes of polymorphism are:

 * Ad hoc polymorphism: defines a common interface for an arbitrary set of individually specified types.
 * Parametric polymorphism: when one or more types are not specified by name but by abstract symbols that can represent any type.
 * Subtyping (also called subtype polymorphism or inclusion polymorphism): when a name denotes instances of many different classes related by some common superclass.[3]

History
Interest in polymorphic type systems developed significantly in the 1960s, with practical implementations beginning to appear by the end of the decade. Ad hoc polymorphism and parametric polymorphism were originally described in Christopher Strachey's Fundamental Concepts in Programming Languages[4], where they are listed as "the two main classes" of polymorphism. Ad hoc polymorphism was a feature of Algol 68, while parametric polymorphism was the core feature of ML's type system.

In a 1985 paper, Peter Wegner and Luca Cardelli introduced the term inclusion polymorphism to model subtypes and inheritance,[2] citing Simula as the first programming language to implement it.

Ad hoc polymorphism
Christopher Strachey chose the term ad hoc polymorphism to refer to polymorphic functions that can be applied to arguments of different types, but that behave differently depending on the type of the argument to which they are applied (also known as function overloading or operator overloading).[5] The term "ad hoc" in this context is not intended to be pejorative; it refers simply to the fact that this type of polymorphism is not a fundamental feature of the type system. In the Pascal / Delphi example below, the  functions seem to work generically over various types when looking at the invocations, but are considered to be two entirely distinct functions by the compiler for all intents and purposes: program Adhoc; function Add(x, y : Integer) : Integer; begin Add := x + y end; function Add(s, t : String) : String; begin Add := Concat(s, t) end; begin Writeln(Add(1, 2));                  (* Prints "3"             *) Writeln(Add('Hello, ', 'Mammals!'));   (* Prints "Hello, Mammals!" *) end. In dynamically typed languages the situation can be more complex as the correct function that needs to be invoked might only be determinable at run time.

Implicit type conversion has also been defined as a form of polymorphism, referred to as "coercion polymorphism".[2][6]

Parametric polymorphism
Parametric polymorphism allows a function or a data type to be written generically, so that it can handle values uniformly without depending on their type.[7] Parametric polymorphism is a way to make a language more expressive while still maintaining full static type-safety.

The concept of parametric polymorphism applies to both data types and functions. A function that can evaluate to or be applied to values of different types is known as a polymorphic function. A data type that can appear to be of a generalized type (e.g. a list with elements of arbitrary type) is designated polymorphic data type like the generalized type from which such specializations are made.

Parametric polymorphism is ubiquitous in functional programming, where it is often simply referred to as "polymorphism". The following example in Haskell shows a parameterized list data type and two parametrically polymorphic functions on them: data List a = Nil | Cons a (List a) length :: List a -> Integer length Nil        = 0 length (Cons x xs) = 1 + length xs map :: (a -> b) -> List a -> List b map f Nil        = Nil map f (Cons x xs) = Cons (f x) (map f xs) Parametric polymorphism is also available in several object-oriented languages. For instance, templates in C++ and D, or under the name generics in C# and Java: class List { class Node { T elem; Node next; }    Node head; int length { ... } } List  map(Func f, List xs) { ... } John C. Reynolds (and later Jean-Yves Girard) formally developed this notion of polymorphism as an extension to lambda calculus (called the polymorphic lambda calculus or System F). Any parametrically polymorphic function is necessarily restricted in what it can do, working on the shape of the data instead of its value, leading to the concept of parametricity.

Subtyping
Some languages employ the idea of subtyping (also called subtype polymorphism or inclusion polymorphism) to restrict the range of types that can be used in a particular case of polymorphism. In these languages, subtyping allows a function to be written to take an object of a certain type T, but also work correctly, if passed an object that belongs to a type S that is a subtype of T (according to the Liskov substitution principle). This type relation is sometimes written S <: T. Conversely, T is said to be a supertype of S—written T :> S. Subtype polymorphism is usually resolved dynamically (see below).

In the following example we make cats and dogs subtypes of animals. The procedure  accepts an animal, but will also work correctly if a subtype is passed to it: abstract class Animal { abstract String talk; } class Cat extends Animal { String talk { return "Meow!"; } } class Dog extends Animal { String talk { return "Woof!"; } } static void letsHear(final Animal a) { println(a.talk); } static void main(String[] args) { letsHear(new Cat); letsHear(new Dog); } In another example, if Number, Rational, and Integer are types such that Number :> Rational and Number :> Integer, a function written to take a Number will work equally well when passed an Integer or Rational as when passed a Number. The actual type of the object can be hidden from clients into a black box, and accessed via object identity. In fact, if the Number type is abstract, it may not even be possible to get your hands on an object whose most-derived type is Number (see abstract data type, abstract class). This particular kind of type hierarchy is known—especially in the context of the Scheme programming language—as a numerical tower, and usually contains many more types.

Object-oriented programming languages offer subtype polymorphism using subclassing (also known as inheritance). In typical implementations, each class contains what is called a virtual table—a table of functions that implement the polymorphic part of the class interface—and each object contains a pointer to the "vtable" of its class, which is then consulted whenever a polymorphic method is called. This mechanism is an example of:

 * late binding, because virtual function calls are not bound until the time of invocation;
 * single dispatch (i.e. single-argument polymorphism), because virtual function calls are bound simply by looking through the vtable provided by the first argument (the  object), so the runtime types of the other arguments are completely irrelevant.

The same goes for most other popular object systems. Some, however, such as Common Lisp Object System, provide multiple dispatch, under which method calls are polymorphic in all arguments.

The interaction between parametric polymorphism and subtyping leads to the concepts of variance and bounded quantification.

Row polymorphism
Row polymorphism[8] is a similar, but distinct concept from subtyping. It deals with structural types. It allows the usage of all values whose types have certain properties, without losing the remaining type information.

Polytypism
A related concept is polytypism (or data type genericity). A polytypic function is more general than polymorphic, and in such a function, "though one can provide fixed ad hoc cases for specific data types, an ad hoc combinator is absent".[9]

Static and dynamic polymorphism
Polymorphism can be distinguished by when the implementation is selected: statically (at compile time) or dynamically (at run time, typically via a virtual function). This is known respectively as static dispatch and dynamic dispatch, and the corresponding forms of polymorphism are accordingly called static polymorphism and dynamic polymorphism.

Static polymorphism executes faster, because there is no dynamic dispatch overhead, but requires additional compiler support. Further, static polymorphism allows greater static analysis by compilers (notably for optimization), source code analysis tools, and human readers (programmers). Dynamic polymorphism is more flexible but slower—for example, dynamic polymorphism allows duck typing, and a dynamically linked library may operate on objects without knowing their full type.

Static polymorphism typically occurs in ad hoc polymorphism and parametric polymorphism, whereas dynamic polymorphism is usual for subtype polymorphism. However, it is possible to achieve static polymorphism with subtyping through more sophisticated use of template metaprogramming, namely the curiously recurring template pattern.


text:
Object Oriented Programming/Encapsulation

Encapsulation

In-the oriented approach, classes,and therefore also objects of that class,are similar to black boxes with a clearly defined interface. This interface is the only mechanism that other objects can use to communicate with the object

We say that inside a class, behind the interface, the data and implementation of the operations are encapsulated or enclosed in a capsule.

This makes the internal workings of a class invisible to all other classes. This is a good technique, since there is no need for other classes to know the internal structure of this class,in other words, how it represents its data and how it performs its operations. We call this encapsulation information hiding.


text:
Object Oriented Programming/Advanced Concepts

Advanced Concepts


text:
Object Oriented Programming/State?

State Machines
If you are unfamiliar with state machines, we won't delve too deep into them, but we highly recommend you look into them more. It's good for your clarity of thought process. Pedantically speaking, state machines are somewhat complicated mathematical constructs, and there are many interesting results that can be derived using the mathematical notation. But that's not our interest. Our interest is two-fold:

 * For one, state machines provide a clear graphical way to illustrate potentially complicated application logic. First, you identify what your possible states are. For example, a server might be IDLE, CONNECTED, BUSY, ERROR, etc. Then, you define all the possible inputs, i.e. messages that the client might send, and for each state diagram the server's response to each input. This helps promote thoroughness as you think about reactions to unanticipated messages in various states.
 * Secondly, state machines are a standard tool with a relatively standard notation. There are tools and libraries that will automatically make code given some canonical state machine format as input. This is effectively what regular expression processors do.

In object oriented programming, "objects" are sometimes implementations of state machines. State machines are a better conceptual underpinning for behavioral entities —servers, regular expression processors, graphics engine, and virtual machines are all good examples of behavioral entities.

A basic distinction between simple objects and behavioral entities is that simple objects do not change their behavior based on their value. In fact, we tend to refer to their value rather than state. Simple objects tend to be kept in collections and searched through, passed to and returned from functions, and in general act like values. String and Rectangle are classic examples. Later on, we'll discuss message passing as an abstraction of method invocation, and it may seem a little strange in the context of simple objects.

If you are still having trouble with the concept of objects, download and play with BlueJ, Most people "get it" within hours of using that IDE.

"State" is Evil!
Let's look at an example, now in Ruby:

We're displaying something over time, so we're dealing with both pixels and seconds. Based on the zoom level, there is a correlation between them: pixels per second, or PPS. In this example, we're maintaining gratuitous state — which is to say, we're holding the position in both seconds AND pixels. This is convenient, and important for users of this class, but we've messed up the encapsulation here. Whenever you set the value in one unit, you've destroyed the correctness for the other unit. Okay, you say, here's a simple fix:

This fixes the obvious error with the previous example, but you've created a lot of work for yourself. Now you have to keep every calculation in every method in the Timeline class duplicated to maintain consistency. There could be dozens more where this came from (trust me). And what about when you add in other units, say inches? You have to duplicate all of that again. Presumably, you see where this is heading: calculated properties, logical properties, virtual properties, whatever you like to call them. Let's see this example again: Now, we're presuming that the conversion factors of PPS and IPS are set correctly for simplicity, but otherwise we've vastly simplified our problem. In twenty other functions we now write, we only have to worry about seconds, there's no consistency problems to worry about. Additionally, if we need to change our base units from seconds to pixels, the Timeline users need never know.

title: Object Oriented Programming/State?


text:
Object Oriented Programming/Interfaces?

Interfaces?

See Also?

 * Wikipedia:Interface_(computing)?
 * Python Programming/GUI Programming?

title: Object Oriented Programming/Interfaces?


text:
Free Knowledge Culture Calendar/December 14

Today in 1988 TAT-8, the first transatlantic fiber-optic cable, entered service.


text:
Free Knowledge Culture Calendar/December 17

Today in 2012 the Freedom of the Press Foundation was launched.


text:
Free Knowledge Culture Calendar/December 20

Today in 1997 was the first release of the GNU Privacy Guard (gpg).


text:
Free Knowledge Culture Calendar/December 21

Today in 1999 the Quake engine was released by id Software as Free Software.


text:
Object Oriented Programming/Static vs Dynamic

= Static vs Dynamic = In Object-Oriented-Programming languages, exists static and dynamic methods as well as properties. Here are the key differences.

Static

 * Cannot access dynamic methods of its own or other class's
 * Cannot access dynamic properties of its own or of another class's
 * Are only instantiated once since they are static and separate instances will always be identical

Dynamic

 * Can access dynamic methods of its own or other class's
 * Can access dynamic properties of its own or of another class's
 * Can be instantiated multiple times, each time with its own unique instance working with potentially unique data

Example
In the code above, you can see that the method squared takes self as a parameter. This allows it to access other properties and methods of the class. As you can see, it takes an initial passed in value, does some modification to it, and then sets the class's value property to the result of the calculation. Since it can access other class methods/properties and modify the class's state, it is considered a dynamic method.

On the other hand, you can see that multiply_value does NOT have self as a parameter. All that this method does is multiply the two passed in values together and return the result. It never has or requires access to its class's properties or methods, it just does the calculation. Since it doesn't need to access unique data of its class, it is only loaded once as any other instance would be identical and a waste of memory, making this a static method.


text:
Object Oriented Programming/Objects

What is an Object?
Loosely, the term object is used to conjure up connections with real world objects like a chair or a guitar. Except that for software, only some simplified abstraction is used, designed specifically for the task at hand. While a real chair is composed of atoms and molecules and reacts to its environment based on the laws of physics and its atomic composition, a "chair object" will vary wildly depending on whether you're writing a game or a Point-of-Sale system for a furniture store. Approaching your problem from the perspective of the chair will not be as productive as approaching the chair from the perspective of your problem.

In most of the languages used in this book, you will find that technically speaking (something akin to whistling 9600 baud, I understand), an object is "an instance of a class". Great, so what does that mean? Well, we can trace this idea all the way back to Plato and his Platonic Ideal. If you spent more time watching Bill and Ted's Excellent Adventure than reading Plato, the idea is that the concept of a chair is a separate entity from any particular chair. In other words, you can conceive of a chair in the abstract without thinking of any particular chair.

In most OOP languages, this abstracted idea of a chair is called a class (from classification) and is a prototype or blueprint for actually making chairs. The act of making something from the blueprint is often called instantiating, and the made thing is both an object and an instance of the class that served as a blueprint. As humans, we normally tend to do this in reverse —we categorize objects we encounter. We can easily identify chair-like things we run into as being chairs; this classification is where we got the term class in the first place.

It is easy to drift off into abstruse philosophical debates over objectness; in some areas like knowledge representation and computational ontology they are very relevant. However, for a computer programmer, it is only necessary to figure out what your application needs to know about and do with chairs. This can be a sufficiently difficult problem, it's usually not necessary to make it harder!

If you're still fuzzy on the whole idea, consider a more technical explanation. Structs (structures), records, tables, and other ways of organizing related information predated object oriented programming. You may be familiar with something like the following Pascal code:

This doesn't actually create a chair variable, but defines what a chair variable will look like when you create one. You could proceed to create arrays of chairs and so forth, and as we hope you've discovered for yourself, this kind of thing is quite indispensable for keeping your programs understandable. Object oriented programming wants to push this advantage and milk it for every ounce of understandability, correctness, and simplicity it can.

A fundamental problem solving technique is divide and conquer —you just have to figure out how to partition your problem into sub-problems. OOP innovators realized that we already had figured out ways to partition the problem, and it was reflected in the way we organized our data, like above. If you looked at an application that had that chair RECORD in it, you would surely find lots of code for doing things with chairs. Why else would you bother to define it? So, if you were to extract all of that code from all over the application and put it together with the chair definition, the reasoning goes, you should have an easier time ensuring that:

  all chair code is correct   all chair code is consistent with each other   there's no duplicated chair code   overall, you have less spaghetti because chair code is no longer tangled up with sofa code etc

So you take that chair definition and that code extracted from all over the application, and call that a class. Take a chair variable and call it an object, and you're off to the races.

Since this is supposed to be a pragmatic book, let's look at our first example code, this time in Python code:

This doesn't look terribly different from the Pascal example. The only difference is that class Chair now contains a has_arms method. Methods are functions that live within a class, and are usually used to process certain class specific data. Hopefully the purpose is fairly clear, so let me point out the important part: has_arms is a calculated or inferred property—this information is not stored directly.

In Python, you would use this class like so:

Here, the "c" variable is an instance of the 'chair' Class, also known as a chair object. We initialize the properties like you would in Pascal (this will change later!) and do one thing if the chair has arms and something else if it doesn't. But we never initialized a "has_arms" property or anything of the like.

Since part of the goal is for you to become syntax agnostic, we present this same example again in C++:

Now, we would just like to mention that this is just the tip of the iceberg and this example is not representative of good style (in either language). There may seem like little purpose to making objects with so little functionality, and you could easily generate equivalent code that requires no new class:

The purpose of this section is to help you understand the terms; we will delve more into the benefits in the sections on encapsulation, polymorphism, inheritance, and on and on. However, let us say that while the "low-level" way might seem shorter and simpler, the object oriented benefits accrue with program size and complexity. This is not surprising, as that's what OOP was designed for, but it does make simple examples hard to come by. So bear with us.

State Machines
If you are unfamiliar with state machines, we won't delve too deep into them, but we highly recommend you look into them more. It's good for your clarity of thought process. Pedantically speaking, state machines are somewhat complicated mathematical constructs, and there are many interesting results that can be derived using the mathematical notation. But that's not our interest. Our interest is two-fold:

 * For one, state machines provide a clear graphical way to illustrate potentially complicated application logic. First, you identify what your possible states are. For example, a server might be IDLE, CONNECTED, BUSY, ERROR, etc. Then, you define all the possible inputs, i.e. messages that the client might send, and for each state diagram the server's response to each input. This helps promote thoroughness as you think about reactions to unanticipated messages in various states.
 * Secondly, state machines are a standard tool with a relatively standard notation. There are tools and libraries that will automatically make code given some canonical state machine format as input. This is effectively what regular expression processors do.

In object oriented programming, "objects" are sometimes implementations of state machines. State machines are a better conceptual underpinning for behavioral entities —servers, regular expression processors, graphics engine, and virtual machines are all good examples of behavioral entities.

A basic distinction between simple objects and behavioral entities is that simple objects do not change their behavior based on their value. In fact, we tend to refer to their value rather than state. Simple objects tend to be kept in collections and searched through, passed to and returned from functions, and in general act like values. String and Rectangle are classic examples. Later on, we'll discuss message passing as an abstraction of method invocation, and it may seem a little strange in the context of simple objects.

If you are still having trouble with the concept of objects, download and play with BlueJ, Most people "get it" within hours of using that IDE.

title: Object Oriented Programming/Objects


text:
Free Knowledge Culture Calendar/December 22

Today in 2017 The Post about Daniel Ellsberg and the Pentagon papers was released nationwide in the USA.


text:
Free Knowledge Culture Calendar/December 25

Today in 1990 the first version of the world’s first web browser, named WorldWideWeb, was released.


text:
Programming Gambas from Zip/Tray Icon Notebook

Design a Notebook Tray Icon
The idea for this program is simple: whatever text you have on the clipboard, click on a handy little tray icon and it will be saved to an SQLite database. Nothing seems to happen, but the text is saved in a new record.

There is also the means to search for notes already saved. This is done in a window that appears when you middle-click the tray icon. I would have preferred it to appear on right-clicking the icon, but right-clicking can only make a menu appear. That is what right-clicks do: they show contextual menus. Now, middle-clicking is fine if you have a mouse with a middle wheel or button that can be clicked. For those of us who use a laptop’s trackpad, middle-clicking is simulated by clicking both left and right buttons simultaneously. On KDE there is an option in System Settings that can disable this, but by default it is enabled.

Experiment with the main window being hidden when the application starts if you like, or not the skiptaskbar property so the minimised main window does not get listed with the other open applications in the panel, but the effects did not appeal at all so they have been left at their defaults.

A Google image search will find a suitable picture for the tray icon:

It does not need to be any particular size. It scales itself nicely when the program runs.

The window has a large text area to show a note, and a textbox at the top left in which to type search text. There are also three labels that display the date/time when the note was saved, the position of the note among all the notes that have been found with that search text in them, and, for interest, the record ID of the note.

The tray icon (bottom left corner) can be placed anywhere. It does not appear in the window. It appears in the system tray (usually at the bottom right corner of the screen, in KDE’s default panel).

The tray icon comes in its own component, so check Project > Properties to see that it and the database components are included:

In summary, to use this notebook:

 * 1) Copy any text to the clipboard.
 * 2) Click the tray icon and your text is saved.
 * 3) Click the tray icon with both left and right mouse buttons at the same time to search for a note.

Sometimes it is useful to save the text then bring up the window and add some key words that will help you find the note again. I sometimes add the words JOKE or QUOTE or FAMILY HISTORY. That way, by typing “QUOTE” in the search box, all my quotes appear and I can step through them one at a time. Copying all selected notes would be a useful feature to add.

The SQL select statement appears in the window caption, for interest.

For good measure, a TEXT menu has four entries for adjusting text:

Type Extra… positions the cursor at the end of the text of the visible note, ready for you to type something extra.

Tidy gets rid of multiple spaces, multiple tabs and multiple blank lines, and removes leading and trailing spaces.

Sentences joins broken sentences. Text copied from emails often has distinct lines.

Double-space separates the paragraphs with a blank line.

These text operations work on the whole of the text if there is no selection, or on the selected text if there is a selection. The shortcuts are there because often I find myself doing the last three in quick succession to get the text looking decent.

The other menus are:

The database is an SQLite file. You might wonder where the OPEN and NEW menu items are. For simplicity, the program creates a new database when it opens if none exists with the name and in the place it expects to find it. It is called Notebook.sqlite and it is in the Home directory. It is easy enough to change the code to make it in the Documents directory if you wish. File > Backup is a useful menuitem that copies the database file to a Backups folder in the Documents folder, date-stamping the file name to show when it was created and to not interfere with earlier backups.

File > Renumber makes the record ID’s sequential, with no gaps. It, and the Vacuum item below it, are unnecessary. Vacuum tidies the internal structure of the database file. It uses SQLite’s inbuilt vacuum command.

File > Quit closes the application. File > Hide makes the window invisible. Clicking the close box on the window also only hides the window; it does not close the application. For this trick, the window’s Persistent property is set to true. The window persists, invisibly, when its close box is clicked. When you type in the search textbox an SQL Select statement selects all the notes that contain that text. It is a simple search: it does not search for notes containing any of the words, ordered from best to least matching. It searches for exactly the text that is typed. As you type each letter the search is performed. A public property in the mdb module, Public rs As Result, stores the results of the search. Notes > Show All clears the search and finds all the notes. This happens when the program starts: all notes are selected. Notes > New… lets you type a new note that is saved when you leave the text area.

Notes > Delete deletes the note currently displayed from the database.

Notes > Clear All clears all notes from the database. There is no undo but there is a chance to bail. Window properties are: Arrangement = Vertical

Stacking = Above

Width = 800

Height = 500 The Tray Icon (ti1) properties that need to be set are: Tooltip = Click to save clipboard text

Visible = True Be sure to set it to visible or you will not see the tray icon when the program is run, and there will be no elegant way of quitting the program when it is running after you hide the window that shows initially.

The Stacking property ensures that the window remains above other windows. If you click in the window belonging to your web browser, for example, the Notebook window does not get covered by the browser window but remains on top, floating above it. This can be useful for utility type programs.

The last thing to note before getting to the code is the use of the keyboard’s arrow keys. UP and DOWN take you to the first and last of the found notes respectively. LEFT and RIGHT step you back or forwards through the found notes. “Found notes” means those that are found to have the string of text in them that you typed in the textbox, or, if nothing has been typed, all the notes.

A few comments follow the code.

Code relating to the database is collected in a module called mdb.

Two useful functions
The Massage(string) function is necessary for handling the saving of text that has single apostrophes in it. SQL statements use single apostrophes to surround strings. A single apostrophe in the string will terminate the string and what follows will be a syntax error as it will be incomprehensible. To include an apostrophe it has to be doubled. For example, to save the string Fred’s house it has to first be converted (“massaged”) to Fred’’s house.

The KeepReplacing(InThis, LookFor, ReplaceWithThis) function performs replacements until the LookFor string is no longer present. For example, if you wanted to remove multiple x’s from abcxxxxdef and just have one single x you cannot just use Replace(“abcxxxxdef”, “xx”, “x”), for this would produce abcxxdef. The first double-x becomes a single x, and the second double-x becomes a single x. You still have a double-x. You have to keep replacing until there are no more double-x’s.

Last Words
That’s all, folks, except for the reference appendices. May I finish where I began, with a word of thanks to Benoît Minisini. This programming environment is a delight to use. With the gratitude of all of us users we sing, glass in hand, “For he’s a jolly good fellow, and so say all of us”.

Gerard Buzolic

25 September 2019


text:
Free Knowledge Culture Calendar/July 21

 Today in 2010 Killed by Code: Software Transparency in Implantable Medical Devices by Karen Sandler et al. from the Software Freedom Law Center was published.

title: Free Knowledge Culture Calendar/July 21


text:
Free Knowledge Culture Calendar/July 22

Today in 2001 The Secret History of Hacking was published, a documentary film about the golden age of hackers whose culture of creativity and sharing spawned the computer industry and their own exclusion with commercialization.

title: Free Knowledge Culture Calendar/July 22


text:
Free Knowledge Culture Calendar/July 24

Today in 2003 BitTorrent metasearch engine Torrentz.com was launched, the second most popular torrent website in 2012 and most widely used torrent meta search engine for over ten years. It was later raided and soon reappeared as Torrentz2.eu.

title: Free Knowledge Culture Calendar/July 24


text:
Free Knowledge Culture Calendar/July 26

 Today in 2011 the Public Laboratory for Open Technology and Science was incorporated.

title: Free Knowledge Culture Calendar/July 26


text:
Free Knowledge Culture Calendar/July 28

 Today in 2003 the first working version of Mozilla Thunderbird was published.

title: Free Knowledge Culture Calendar/July 28


text:
User:LGreg/sandbox/Approaches to Knowledge (LG seminar)/Group 1

This is the sandbox page for Lara's seminar group that meets Fridays 10-11am.

Here you can jot down notes, reflections and interesting content to do with the four issues we'll be covering this term:

 * History
 * Truth
 * Evidence
 * Power

Suggested readings


text:
User:LGreg/sandbox/Approaches to Knowledge (LG seminar)/Group 2

This is the sandbox page for Lara's seminar group that meets Fridays 11-12pm.

Here you can jot down notes, reflections and interesting content to do with the four issues we'll be covering this term:

 * History
 * Truth
 * Evidence
 * Power

Suggested readings


text:
Free Knowledge Culture Calendar/August 2

Today in 2016 the Windows Subsystem for Linux was released. This allows the installation of a full Linux kernel as part of Windows. After its manufacturer Microsoft had long been known as the arch-enemy of Free Software, this was perhaps the clearest conceivable sign that this war is over. Microsoft had transformed itself – at least in parts – into an Open Source company and became, among other things, the largest Linux distributor.


text:
Free Knowledge Culture Calendar/August 8

Today is International Cat Day. Although the awareness day originated from a more general animal welfare intention, it has particular resonance on the Internet, where the world’s most popular pet has quickly gained a foothold: Viral cat content is the most iconic example of Internet pop culture, complete with Internet Cat Video Festival and its “Golden Kitty” awards. Cats’ diverse behaviors and cute looks contribute to their prominence as a source of feel-good moments for Internet users.


text:
Free Knowledge Culture Calendar/August 12

Today in 1996 the first MP3 warez release group Compress ’Da Audio was founded. It released compressed Audio-CDs including WinPlay3.


text:
Free Knowledge Culture Calendar/August 24

Today in 2007 the first SIM unlock process for the Apple iPhone was demonstrated by George Hotz. Apple is notorious for not allowing consumers to take full control of their own devices. The unlock represents a first milestone of iOS jailbreaking.


text:
Free Knowledge Culture Calendar/August 25

 Today in 1991 Linus Torvalds announced his new operating system kernel that was later named Linux.

With Version 7 Unix, the source code no longer got published and forbidden to use even for educational purposes. Computer science professor Andrew Tanenbaum therefore wrote a new source-available Unix called Minix for his teaching purposes. Many Unix enthusiasts, including Linus Torvalds, adopted Minix because they could not afford a full-fledged commercial Unix. Tanenbaum was conservative about adding features, and for many, progress was slower than desired. The arrival of Linux was therefore met with excitement by many Minix users, however immature it was. The project has developed and pioneered several aspects of open, Internet-based software development.


text:
OpenSCAD Tutorial

Table of Contents

 * Introduction
 * Chapter 1
 * A few words about OpenSCAD
 * Getting started with the Tutorial
 * Basic information about the OpenSCAD environment
 * Creating your first object
 * Creating a slightly different cube
 * Adding more objects and translating objects
 * The cylinder primitive and rotating objects
 * Completing your first model
 * Creating a second model

 * /Chapter 2/
 * Scaling parts or the whole model
 * Quick quiz
 * Parameterizing parts of your model
 * Parameterizing more parts of your model
 * Challenge
 * Parameterizing your own models

 * /Chapter 3/
 * The sphere primitive and resizing objects
 * Combining objects in other ways

 * /Chapter 4/
 * Defining and using modules
 * Parameterizing modules
 * Defining default values of module’s parameters
 * Separating the whole model into modules

 * /Chapter 5/
 * Creating and utilizing modules as separate scripts
 * Using a script with multiple modules
 * Using the MCAD library
 * Creating even more parameterizable modules
 * Challenge

 * /Chapter 6/
 * OpenSCAD variables
 * Conditional variable assignment
 * More conditional variable assignments
 * Conditional creation of objects – If statement
 * Challenge

 * /Chapter 7/
 * Creating repeating patterns of parts/models – For loops
 * Creating more complex patterns
 * Challenge
 * Creating patterns of patterns – Nested for loops

 * /Chapter 8/
 * Rotationally extruding 3D objects from 2D objects
 * Challenge
 * Linearly extruding 3D objects from 2D objects

 * /Chapter 9/
 * Doing math calculations in OpenSCAD
 * Creating any 2D object with the polygon primitive
 * Challenge
 * Creating more complex object using the polygon primitive and math
 * Another challenge

Useful links

 * OpenSCAD's website
 * Download OpenSCAD
 * Syntax cheat sheet
 * The OpenSCAD Language Manual for use later as a reference.

title: OpenSCAD Tutorial


text:
OpenSCAD Tutorial/Chapter 1

A few words about OpenSCAD
OpenSCAD is for crafting 3D models through the art of Constructive Solid Geometry. It unlocks a world of creativity, where elementary operations are like our building blocks.

Let's shape up some fun.

Getting started with the Tutorial
This tutorial will be your trusted guide. We'll be exploring examples and unveil the secrets of OpenSCAD. By the end of this tutorial, you will have the tools to forge your own unique 3D models, line by line.

With each step, you'll gain confidence and expertise, honing your skills as an image creator. You will breathe code into your designs, crafting intricate structures and bringing your design ideas to fruition.

Throughout this tutorial, we'll be your companion, offering guidance to unlock the full potential of OpenSCAD.

You'll explore, learn, and create.

User Interface
After starting OpenSCAD the window should look similar to the image below.

The Window is divided in three columns.

 * 1) In the left column, is seen the builtin text editor, where the true magic unfolds. As you enter keyboard commands you can view the transformation of code into art.
 * 2) In the middle column, the displayed 3D View is where your design creations come to life. At the bottom lies the operations sequence console, always ready to lend a helping hand. It unravels the mysteries of mistakes and guides you towards mastery. It is your trusted guidance companion.
 * 3) And note the right column, the GUI Customizer. It offers the user a gift of ease toolbar, a graphical interface to tweak and twist your model's parameters.

Creating your first object
Your first object is going to be a perfect cube with side length of 10. In order to create it you need to type the following code in the text editor and hit the preview (first) icon on the action bar below the reference axes.

There are a few fundamental concepts that you should learn from the start regarding the OpenSCAD scripting language, especially if you don’t have a programming background. The word 'cube' is part of OpenSCAD scripting language and is used to command OpenSCAD to create a cube. The 'cube' command is followed by a pair of parentheses, inside of which the parameter size is defined to be 10. Any definition of parameters that a command may require is always done inside a pair of matching parentheses that follow the command word. The semicolon after the last parenthesis indicates the end of that statement and helps OpenSCAD to parse the script that you have typed in the text editor. Because a semicolon is used to indicate the end of each statement you have the freedom to format your code in any way you like by inserting whitespace.

You just read "hit preview" three times in the last paragraph. When you hit "preview" OpenSCAD parses your script and creates the appropriate model. Every time you make a change to your script (ex. adding whitespace) or later when adding additional statements, you need to hit "preview" to see the effect of these changes.

Creating a slightly different cube
A cube doesn’t have to be perfect (equal distance). A cube can (be cubical) have different side lengths. Use the following statement to create a cube (cubical) with side lengths of 25, 35 and 55.

The first thing that you should notice is that this cube is quite large compared to the previous one. In fact, it is large enough that it doesn’t fit in the viewport. In order to fix this, you can move your mouse over the viewport and scroll out until you can see the whole cube. You can always zoom in and out by moving your mouse over the viewport and using the scroll wheel. Alternatively, you can use the zoom in (fourth) and out (fifth) icons on the action bar below the viewport. You can let OpenSCAD automatically choose a convenient zoom level by using the view all (third) icon in the same action bar.

Apart from zooming in and out you can also move and rotate the view of your model. To do so you need to move your mouse over the viewport and drag while holding right click to move or drag while holding left click to rotate. You can reset the view by using the reset view (sixth) icon on the action bar below the viewport.

The second thing that you should notice is that in order to create a cube with different side lengths you need to define a pair of brackets with three values inside the parentheses. The pair of brackets is used to denote a vector of values. The values of the vector need to be comma-separated and correspond to the cube side lengths along X, Y and Z axis. When the cube command is used with a vector of three values as its input, OpenSCAD creates a cube with different side lengths that correspond to the values of the vector. Remember that you previously used the cube command to create a perfect cube by defining the value of the parameter size. Most OpenSCAD commands can be used with different parameters, even with more, less or no parameters to achieve different results.

You should notice that every cube is created on the first octant. You can define an additional parameter named center and set it equal to true in order to make the cube centered on the origin. The complete statement is the following.

Notice that when more than one parameter is defined inside the parentheses, they need to be separated with a comma.

Adding more objects and translating objects
The constructive solid modelling approach uses a number of fundamental objects along with a number of ways to transform and combine these objects to create more complex models. The cube that you have been using in the previous examples is one such fundamental object. The fundamental objects are also called primitives and are directly available in OpenSCAD scripting language. A car for example is not an OpenSCAD primitive, as there is no corresponding keyword in the scripting language. This makes absolute sense because OpenSCAD is a set of modelling tools rather than a library of predefined models. Using the available tools, you can combine the available primitives to create your own car. To do this you need to know how to add more than one object to your model.

First create a cube with side lengths of 60, 20 and 10 that is centered on the origin.

In order to add a second cube to your model type an identical statement in the next line of the text editor, but change the side lengths to 30, 20 and 10.

You should not be able to see any change in your model because the second cube is not larger than the first cube in any direction and is currently completely covered by the first cube. By modifying the second statement in the following way, you can translate the second cube to locate it partially above the top of the first cube.

You achieved this by using the "translate" command which is one of the available transformations. The translate command as well as the rest of the transformations don’t create any object on their own. They are rather applied on existing objects to modify them in a certain way. The translate command can be used to move an object to any point in space. The input parameter for the translate command is a vector of three values. Each value indicates the amount of units that the object will be moved along the X, Y and Z axis. You should notice that there is no semicolon after the translate command. What follows the translate command is the definition of the object that you want to translate. The semicolon is added at the end to indicate the completion of the statement.

On the example above, the second cube sits exactly on top of the first cube. This is something that should be avoided as it’s not clear to OpenSCAD whether the two cubes form one object together. This issue can be easily solved by always maintaining a small overlap of about 0.001 - 0.002 between the corresponding objects. One way to do so is by decreasing the amount of translation along the Z axis from 10 unit to 9.999 units.

Another way to do so more explicitly is by subtracting 0.001 units from the corresponding value on the script.

There is a third way. For not losing 0.001 from the top we could add a third cube with dimensions like the smaller cube, and height of 0.002 ([30, 20, 0.002]). The third cube will close the gap.

This is something you are going to encounter throughout the tutorial. When two objects are exactly touching each other, you should always guarantee a small overlap by subtracting or adding a tolerance of 0.001 units.

The cylinder primitive and rotating objects
The model that you just created looks like the body of a car that has bad aerodynamics. That’s ok. You will be making the car look a lot more interesting and aerodynamic in the following chapters. For now, you are going to use the cylinder primitive and the rotate transformation to add wheels and axles to your car. You can create a wheel by adding a third statement that consists of the cylinder command. You will need to define two input parameters, h and r. The first one will be the height of the cylinder while the second one will be its radius.

You should notice that the cylinder is hidden by the rest of the objects. You can use the translate command to make the cylinder visible by translating it 20 units along the negative direction of the Y axis.

The wheel is now visible, but your car won’t go anywhere if its not properly placed. You can use the rotate command to make the wheel stand straight. To do so you need to rotate it 90 degrees around the X axis.

The first thing you should notice is the absence of semicolon between the rotate and translate command. You should be already getting familiar with this concept. The semicolon is only added at the end of a statement. You can keep adding as many transformation commands as you like in a similar fashion, but you should not include a semicolon between them.

The second thing you should notice is that the rotate command has one input parameter, which is a vector of three values. In complete analogy to the translate command each value indicates how many degrees will an object be rotated around the X, Y and Z axis.

The third thing you should notice is that the wheel is standing straight but as a result of its rotation around the x axis it has moved below the car. This happened because the object was already moved away from the origin before it was rotated. A good practice for placing objects inside your model is first to rotate them and then to translate them to the desired position. Note that OpenSCAD generates the object, and then applies the object's transformations starting with the one immediately before the object definition and working backwards. So in order to rotate your object and then move it with a translation, specify the translation first in the code, followed by the rotation, followed by the object definition.

It already looks a lot better than the previous position of the wheel.

You should notice that the position of the wheels is not symmetric. This happened because the cylinder was not created centered on the origin.

Completing your first model

You should notice that on the model above there is an overlap between the axles and the wheels that is equal to half the thickness of the wheels. If the model was created in a way that the wheels and the axles were just touching each other then there would be a need to ensure a small overlap between them as was done with the two cubes of the car’s body.

One thing that may have bothered you so far is the resolution of the wheels. Until now you have been using OpenSCAD’s default resolution settings. There are special commands in OpenSCAD language which allow you to have full control over the resolution of your models. Increasing the resolution of your model will also increase the required rendering time every time you update your design. For this reason, it is advised that you keep the default resolution settings when you are building your model and increase the resolution only after completing your design. Since the car example is completed, you can increase the resolution by adding the following two statements in your script.

Try adding the above two statements at the beginning of the car’s script. Do you notice any changes in the resolution of the wheels?

In reality $fa and $fs are special variables that determine the resolution of the model according to the values that have been assigned to them. Their exact function will be explained later and is something that you should not worry about yet. The only thing you need to keep in mind is that you can add these two statements in any script to achieve a resolution that is universally good for 3D printing. These two statements will be used in all examples throughout the tutorial in order to have visually appealing renderings.

Before sharing your script with your friends, it would be nice to include some comments to help them understand your script. You can use a double slash at the start of a line to write anything you like without affecting your model. By using a double slash OpenSCAD knows that what follows is not part of the scripting language and simply ignores it.

It’s time to save your model. Hit the save (third) icon on the action bar above the editor to save your script as a *.scad file. When you are creating a new model remember to save early and then save often to avoid accidentally losing your work.

If you would like to 3D print your car you can export it as an STL file. You should first hit the render (second) icon on the action bar below the viewport to generate the STL data of your model. You should then hit the export as STL icon on the action bar above the editor to save a STL file of your model.

title: OpenSCAD Tutorial/Chapter 1


text:
OpenSCAD Tutorial/Chapter 2

Scaling parts or the whole model
The model you created in the previous chapter was a great starting point for working with OpenSCAD, but perhaps after seeing it you recognized some aspects which should be changed. Here we will discuss strategies for modifying components of designs. One way to do so is by using the scale command, which is another one of the transformation commands. Modify the statement that creates the base of the car’s body in the following way in order to increase the length of the body by a ratio of 1.2.

You should notice that the scale command is used like the transform and rotate commands. It is added to the left of an existing statement without including a semicolon in between and it has a vector of three values as an input parameter. In analogy to the translate and rotate commands each value corresponds to the scaling ratio along the X, Y and Z axis.

It is also possible to apply the same scale command or any other transformation command to more than one objects. Use the following code to apply the scale command to both the base and the top of the car’s body.

The first thing you should notice is that in order to apply the scale command to more than one object, a set of curly brackets is used. The statements that define the corresponding objects along with their semicolons are placed inside the curly brackets. The curly brackets don’t require a semicolon at the end.

The second thing you should notice is how the use of white space and comments increase the readability of your script. The following script is exactly equivalent, you can decide for yourself which one you’d rather have to read.

 * For the wheels not to deform, the scaling factors along the X and Z axis should be equal.

Quick quiz
The following script is the model you created in the first chapter.

Parameterizing parts of your model
You should have gotten the point that a model is most of the times not intended to exist in one version. One of the powers of OpenSCAD scripting language lies in making easy the ability to reuse models over and over again or simply to play around with them until you are satisfied to commit to a final version. It’s time to make some modifications to your car!

Although it wasn’t that hard to change the size of wheels it could have been much simpler. First, it could have been easier to find which values to change. Second, you could have only one value to change since all wheels have the same radius. All this can be achieved with the use of variables. In the following script a variable for the radius of the wheels is introduced.

Every variable has two parts: a name and a value. In this example, the variable name is "wheel_radius". A valid variable name uses only alphanumeric characters and underscores (A-Z, a-z, 0-9, and _). After the variable name, an equals sign separates the name from the value, and is followed by the value itself. Finally, a semicolon is required at the end to denote the completion of that statement. It’s a good practice to keep your variables organized by defining them all at the top of the document.

Once a variable is defined, it can be used in the code to represent its value. In this example, the cylinder commands have been modified to use the wheel_radius variable for the input parameter r. When OpenSCAD evaluates this script, it will set the input parameter r equal to the value of the wheel_radius variable.

There is one important thing you should keep in mind about the behavior of variables in OpenSCAD. The variables in OpenSCAD behave like constants. They can hold only one value which they keep throughout the creation of your model. So, what happens if you assign a value to wheel_radius at the start of your script and then assign a new value to it after the definition of the two front wheels? Will the rear wheels have different size compared to the front wheels?

You should notice that all wheels have the same size. If multiple assignments to a variable exist, OpenSCAD uses the value of the last assignment. Even statements that make use of this variable and are defined before the last value assignment, will use the value of the last assignment.

OpenSCAD will also give a warning in this case: WARNING: wheel_radius was assigned on line 3 but was overwritten on line 17

Parameterizing more parts of your model
You can now easily play around with the size of the wheels. It would be nice if you were able to customize more aspects of your model with such ease. You should notice for a moment that modifying the size of the wheels doesn’t affect any other aspect of your model, it doesn’t break your model in any way. This is not always the case.

It is obvious that the body of the car stops being one as the base and the top separate. This happened because the correct position of the body’s top is dependent on the height of the body’s base and the height of body’s top. Remember that in order to make the top sit on top of the base you had to translate the top along the Z axis by an amount equal to half the height of the base plus half the height of the top. If you want to parameterize the height of the base and the top you should also parameterize the translation of the top along the Z axis.

You should remember that every time you parameterize some aspect of your model you should also parameterize additional dependent aspects to prevent your model from breaking apart.

Challenge
The following script corresponds to the car model with parameterized wheel radius, base height, top height and track.

By now it should be clear to you that parameterizing your models unlocks the power of reusing, customizing and iterating your designs as well as that of effortlessly exploring different possibilities.

Parameterizing your own models
Have you put your new skills into use? Have you created any other models yourself?

title: OpenSCAD Tutorial/Chapter 2


text:
Free Knowledge Culture Calendar/August 26

Today in 1997 Bruce Perens announced The Open Hardware Certification Program, an early Open Hardware initiative.


text:
Free Knowledge Culture Calendar/September 1

Today in 2015 the Alliance for Open Media and AV1 were announced.


text:
Free Knowledge Culture Calendar/September 4

Today in 1998 Google, Inc. was incorporated.


text:
Free Knowledge Culture Calendar/September 14

Today in 2015 Stephanie Lenz wins against Universal Music after fighting for fair use of copyrighted content for over eight years. The verdict said that copyright holders must consider fair use in good faith before issuing a content takedown notice.


text:
Free Knowledge Culture Calendar/September 15

 Today in 2003 The Pirate Bay was founded, the most iconic and resilient of all file-sharing platforms. It was born in the context of a widespread sense of entitlement among Scandinavians who see the American content industries as an ungrateful beneficiary of the fertile breeding ground of pop music that Scandinavia is, with international names like Abba and Roxette.


text:
Free Knowledge Culture Calendar/September 19

Today in 2009 began the Free Software Foundation mini-summit on Women in Free Software. It was just one project in a wave of activity that rebirthed and set a regular schedule for GNOME’s outreach program which grew into a successful and lasting project. It was one of the first official acknowledgements of systemic sexism the Free Software world. Even compared to the rest of the IT industry, the gender ratio was several times worse.


text:
Free Knowledge Culture Calendar/September 20

Today in 2002 the initial release of the Tor software took place.


text:
Free Knowledge Culture Calendar/September 21

 Today in 2015 people started to share their abortion experiences in public under the hashtag #ShoutYourAbortion as a campaign against stigmatization and shaming.


text:
Free Knowledge Culture Calendar/February 17

Today in 2012 The Document Foundation was incorporated, a neutral foundation for the development of OpenOffice. Because Oracle resisted the concept, the office suite was forked. Although Oracle showed some effort and made OpenOffice an Apache project, influential Linux distributions and most users switched to LibreOffice.


text:
Free Knowledge Culture Calendar/January 23

Today in 2018 the W3C published the ActivityPub standard.


text:
Free Knowledge Culture Calendar/January 25

Today in 2017 the first stable version of Google’s Chromium/Chrome web browser was released that had WebRTC enabled by default and without prefix. Firefox followed two days later, although standardization is still not finished. It enables web browsers to not only access resources on central servers, but also make peer-to-peer connections to other browsers, topped off with a multimedia streaming framework. Among other things, this puts the missing free replacement for Skype into everyone’s browsers and provides an infrastructure for a more decentralized web.


text:
Free Knowledge Culture Calendar/January 30

Today in 2001 The Hacker Ethic by Pekka Himanen was published.


text:
Free Knowledge Culture Calendar/February 6

Today in 1986 the Free Software Definition was published in GNU’s Bulletin.


text:
Free Knowledge Culture Calendar/February 12

 Today in 2007 version 1.0 of the Definition of Free Cultural Works was released.


text:
Free Knowledge Culture Calendar/February 13

Today in 1258 Mongols conquered Baghdad, killing scientists and philosophers and destroying the House of Wisdom and over thirty other public libraries, concluding the Islamic Golden Age and the Translation Movement.


text:
Free Knowledge Culture Calendar/February 15

Today in 1995 was the high-profile arrest of Kevin Mitnick. After being mistreated by the judiciary following an earlier arrest, he disappeared and was on the run for two and a half years. In a world that had become afraid of hackers, his judge was convinced that he could start a nuclear war from a phone. After years of imprisonment without trial or bail hearing, beatings and months of solitary confinement, he was convicted of computer and wire fraud and received a sentence that was higher than that of many killers.


text:
Free Knowledge Culture Calendar/February 16

Today in 1978 the first bulletin board system went online. One by one, people could call the system and read and leave messages, as if using a shared answering machine, harnessing the potential of combining affordable computers and modems. For nearly 20 years, BBSs were the primary way for computer users to get online, share software, join online communities, ...


text:
Free Knowledge Culture Calendar/February 19

On this day in 1971 the first warrant to search computer storage is issued in San Jose, California, for a trade secret theft investigation. It kicked off a new era of digital forensics and led to people protecting local personal data with (“warrant-proof”) encryption. The effectiveness of cryptography against comprehensive state surveillance capabilities is the basis of crypto-anarchism. For others it is a flaw in the desired unrestricted access of investigative authorities and intelligence agencies. As a result, there are regular calls for bans on strong encryption, justified by polemical reference to either terror or child pornography, and bigger waves of criminalization of the use of strong cryptography that have become known as the Crypto Wars. They make defending personal use of strong encryption an ongoing necessity. Even the strongest advocates of freedom of information make an exception for individual privacy, which is another important foundation for the free development of one’s personality.


text:
Free Knowledge Culture Calendar/February 20

Today in 1991 the first public version of Python (v0.9.0) was released.


text:
Free Knowledge Culture Calendar/February 22

Today in 2018 billionaire Elon Musk’s company SpaceX launched the first two satellites for its mega-constellation Starlink. It is intended to close the last gaps in global Internet coverage. The plan is to launch several times as many satellites than all previous ones combined. But some countries and all of Musk’s major competitors each have a similar plan (OneWeb, Kuiper, Hongyan, ...). Tens or hundreds of thousands of new satellites mean potential problems for future access to space and astronomical observations.


text:
Free Knowledge Culture Calendar/February 25

Today in 1989 the GNU General Public License was published. It was a generalized and sectioned version of the preceding special GPLs for EMACS, GCC, ...


text:
Free Knowledge Culture Calendar/February 28

Today in 2008 Here Comes Everybody: The Power of Organizing Without Organizations by Clay Shirky was published.


text:
Free Knowledge Culture Calendar/March 3

Today in 2008 the OStatus protocol was introduced in StatusNet (GNU social).

title: Free Knowledge Culture Calendar/March 3


text:
Free Knowledge Culture Calendar/March 8

Today in 2002 Scientology attorneys sent Google a DMCA takedown notice in which they requested to delist xenu.net aka. Operation Clambake. Following public outcry, it was partially relisted and Google started submitting its cease and desist requests to the Lumen (formerly Chilling Effects) database and link to them from censored search results.

title: Free Knowledge Culture Calendar/March 8


text:
Free Knowledge Culture Calendar/March 9

Today in 1992 was the first release of ViolaWWW, the first popular browser on the Web.

title: Free Knowledge Culture Calendar/March 9


text:
Free Knowledge Culture Calendar/March 10

Today in 2001 the Free Software Foundation Europe was founded.


text:
Galician/Lesson 1/Colours

These are the most common colors in Galician language:

Branco = white

Negro/Preto = black

Cinzo/cincento = grey

Vermello = red

Azul = blue

Verde/verdescente = green

Amarelo = yellow

And others not so common:

Laranxa = orange

mourado = violet

castaño/pardo/marrón = brown

title: Galician/Lesson 1/Colours


text:
Free Knowledge Culture Calendar/March 11

Today in 2008 Library Genesis was launched.


text:
Free Knowledge Culture Calendar/March 12

Today is the birthday of Jude Milhon. She was a civil rights and cyber activist and senior editor at Mondo 2000, coined the term cypherpunk and co-created the bulletin board system Community Memory. She had significant influence on the hacker ethic.


text:
Free Knowledge Culture Calendar/October 5

Today in 2016 Colin R. Turner published Into The Open Economy in which he proposes “open access economy”, an economy without trade and governance.


text:
Free Knowledge Culture Calendar/March 14

Today in 2000 was the initial release of Gnutella, the first decentralized peer-to-peer file-sharing system. It had several offshoots, such as Foxy, which is popular in Macau, Hong Kong, and Taiwan. Peer-to-peer technology brought back the promise of democratization that was seen in the decentralized design of the Internet (routing). Its most iconic application was music file sharing.


text:
Ethical Debates in Connected Culture 2019

Preamble
This is the opening page to the Ethical Debates in Connected Culture 2019 Wikibook.

As the title suggests, this is a book which seeks to record contributions to the understanding of a specific set of topics, loosely grouped under the subject area of "Cultural Experience of Connected Media", of particular salience to 2019.

It is put together through the combined talents and efforts of a cohort of students taking the postgraduate module CMCPP10 during the Autumn Semester 2019 at the University of Stirling in Scotland, UK. It is an assessed educational project. We would like to thank the Wikibooks community for assistance given in the course of this project, and also encourage leniency in dealing with our work - we are all beginners in the world of wiki here, but are keen to learn!

The aim of this educational project is, firstly, for students to record the content of their learning and their contributions to this book will reflect their studies on one of the featured themes. This will appear in the form of a series of Collaborative Essays, and therefore this Wikibook is a sort of edited collection or anthology, much like examples found in academic publishing. However, secondly and most importantly, the hope is that students will learn the values associated with working at different levels as individual researchers, as research teams, and as part of a research community on Wikimedia and other open knowledge platforms. That is to say: producing knowledge; collaboration and sharing; and peer-reviewing the work of others for the good of the community throughout Wikimedia, but in particular on Wikibooks.

Students will thus gain hands-on experience of a wiki environment, and what it is like to be part of a knowledge-building community, within the auspices of one of Wikimedia's large projects (i.e. Wikibooks) and make something that adds to currents in the academic field of digital media and society.

Note that while this is a class project, anyone may contribute as Wikibooks does not permit "ownership" of material.

List of Contributors
This Wikibook is being put together as an on-going a collaborative class project by the following Wikimedian contributors. Together, they form a cohort of students studying the Living in a Connected World module as part of their postgraduate degree programme in the Division of Communications, Media and Culture, University of Stirling, Scotland, UK. Doubtless, there are other contributors within the Wikibooks and Wikipedia community who have contributed advice, support, suggestions and content in collaboration with these students. Your help and advice is most appreciated. Thank you!

 * Contributors, please feel free to sign your username on the contributors page here

Glossary
A list of definitions of key terms to be found in this Wikibook, student contribs from all project groups welcome. See here.


text:
Ethical Debates in Connected Culture 2019/Contributors

 * 1) GregXenon01 (discuss • contribs) 17:06, 27 September 2019 (UTC)
 * 2) XiaolinSun (discuss • contribs) 14:25, 28 September 2019 (UTC)
 * 3) Klp00015 (discuss • contribs) 14:26, 28 September 2019 (UTC)
 * 4) Ruaraidh98 (discuss • contribs) 14:26, 28 September 2019 (UTC)
 * 5) Nicolasmall (discuss • contribs) 14:28, 28 September 2019 (UTC)
 * 6) MingchenTeng (discuss • contribs) 14:30, 28 September 2019 (UTC)
 * 7) Knowers (discuss • contribs) 15:08, 28 September 2019 (UTC)
 * 8) Nicole0000119 (discuss • contribs) 11:15, 23 October 2019 (UTC)
 * 9) Diane820 (discuss • contribs) 16:06, 23 October 2019 (UTC)
 * 10) Baizihao123 (discuss • contribs) 20:33, 30 October 2019 (UTC)
 * 11) Zhang xinli2012 (discuss • contribs) 11:33, 2 November 2019 (UTC)
 * 12) Sara Hamad El Niel (discuss • contribs) 15:16, 2 November 2019 (UTC)


text:
Free Knowledge Culture Calendar/March 23

Today in 2005 the RepRap project started working on the first of its first low-cost, self-replicating 3D printer.


text:
Free Knowledge Culture Calendar/March 25

Today in 1999 The Apache Software Foundation was incorporated. Its permissive licensing terms made it popular with commercial information technology companies.


text:
Free Knowledge Culture Calendar/March 26

 Today in 2001 the seminal paper on Freenet was published.


text:
Free Knowledge Culture Calendar/March 28

Today in 2012 Red Hat announced revenue figures. For the first time a company whose business is based solely on open source products exceeded one billion dollars in annual revenue.


text:
Free Knowledge Culture Calendar/March 29

 Today in 2011 MAFIAAFire was registered on addons.mozilla.org. The United States Department of Homeland Security ordered its takedown in April and Mozilla resisted.


text:
Free Knowledge Culture Calendar/April 5

Today in 2010 WikiLeaks published the Baghdad airstrike video that they had obtained from Chelsea Manning. Smear campaigns and ongoing criminalization attempts against the publisher, Julian Assange, ensued.

For many, this was the first unvarnished look at modern warfare, shattering the propaganda myth of clean war and standing in stark contrast to the righteous public image, even though the patterns of how challenged power reacts and the dirty psychological dynamics inherent in war are the same everywhere.

title: Free Knowledge Culture Calendar/April 5


text:
Free Knowledge Culture Calendar/April 6

Today in 2004 was the first release of the X.Org Server.

title: Free Knowledge Culture Calendar/April 6


text:
Free Knowledge Culture Calendar/April 18

Today in 2017 Jonathan Taplin published Move Fast and Break Things: How Facebook, Google, and Amazon Cornered Culture and Undermined Democracy.


text:
Free Knowledge Culture Calendar/April 19

Today in 1987 the early cracking group FAiRLiGHT was founded.


text:
Free Knowledge Culture Calendar/April 23

Today is World Book and Copyright Day.


text:
Free Knowledge Culture Calendar/April 29

Today in 1579 was the death of Diego de Landa. He ordered the burning of Mayan scripture in order to eradicate pagan rites. They were the most advanced writings of Mesoamerica.


text:
Free Knowledge Culture Calendar/May 5

Today in 1974 the paper on TCP was published. TCP later got a more modular design and ARPANET switched to TCP/IP on January 1, 1983.

title: Free Knowledge Culture Calendar/May 5


text:
Free Knowledge Culture Calendar/May 7

Today in 1987 Brian Reid, John Gilmore, and Gordon Moffett decided to create the alt.* hierarchy on the Usenet.

title: Free Knowledge Culture Calendar/May 7


text:
Trainz/Content Creators

Trainz/refs/TrainzBaseSpec

title: Trainz/Content Creators


text:
Free Knowledge Culture Calendar/May 10

Today in 2002 Shuman Ghosemajumder published Advanced peer-based technology business models, which proposed the Open Music Model, aimed at disempowering the widespread copyright piracy and met wide adoption in the content industry.

title: Free Knowledge Culture Calendar/May 10


text:
Free Knowledge Culture Calendar/May 12

Today in 1996 the Internet Archive was founded.

title: Free Knowledge Culture Calendar/May 12


text:
History of wireless telegraphy and broadcasting in Australia/Topical/Biographies/Henry Freeman Coffey

Henry Freeman Coffey was a prominent ships wireless operator, coastal radio operator, amateur operator, amateur broadcaster and amateur club participant in the late 1900s and early 1930s. His station callsign was 4KY (4=Queensland, K=?, Y=?) and he operated from Brisbane (Doomben), Queensland, inter alia. A summary biography has not yet been prepared however the following resources have been assembled in preparation:
 * Transcriptions and Notes - Henry Freeman Coffey - More than 50 transcriptions and notes
 * Photos, QSL cards and other graphics - Henry Freeman Coffey - Nothing uploaded as yet