<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Emacsen's Blog</title><link href="https://blog.emacsen.net/" rel="alternate"></link><link href="https://blog.emacsen.net/atom.xml" rel="self"></link><id>https://blog.emacsen.net/</id><updated>2018-02-16T00:00:00-05:00</updated><entry><title>Why OpenStreetMap is in Serious Trouble</title><link href="https://blog.emacsen.net/blog/2018/02/16/osm-is-in-trouble/" rel="alternate"></link><published>2018-02-16T00:00:00-05:00</published><updated>2018-02-16T00:00:00-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2018-02-16:/blog/2018/02/16/osm-is-in-trouble/</id><summary type="html">&lt;p&gt;I was a contributor for OpenStreetMap for a long time, and I advocated for OpenStreetMap for a long time, but the project has stalled while the proprietary mapping world has continued to improve in data quality. For those of us who care about Free and Open data, this is a …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I was a contributor for OpenStreetMap for a long time, and I advocated for OpenStreetMap for a long time, but the project has stalled while the proprietary mapping world has continued to improve in data quality. For those of us who care about Free and Open data, this is a problem. In this article, I explore the reasons why I think OSM has stalled, as well as solutions to get the project back on track.&lt;/p&gt;
&lt;p&gt;I was a contributor to the OpenStreetMap project from 2008 until roughly 2016. I was heavily invested in the project. In that time, I mapped, organized mapping groups in two cities, contributed to the founding of OpenStreetMap US, a non-profit dedicated to OpenStreetMap in the United States, gave talks on and about OpenStreetMap, contributed to the OpenStreetMap.org codebase, mentored two students for OSM through Google Summer of Code, started a working group dedicated to import of data into OpenStreetMap in the US, created and coordinated a massive bot run in the US, moderated the Reddit page &lt;a href="https://reddit.com/r/openstreetmap"&gt;r/OpenStreetMap&lt;/a&gt; and was a member of the OpenStreetMap Data Working Group, which gave me escalated privileges (both politically and technically) for the project. There are few parts of OpenStreetMap where I didn't have some either direct or indirect involvement.&lt;/p&gt;
&lt;p&gt;I'm also the author of an article called &lt;a href="https://blog.emacsen.net/blog/2014/01/04/why-the-world-needs-openstreetmap/"&gt;Why the World Needs OpenStreetMap&lt;/a&gt;, which appeared in two large publications, The Guardian Online and Gizmodo, was on the front page of Hacker News twice and translated into at least four different languages. I was a proud OpenStreetMap advocate!&lt;/p&gt;
&lt;p&gt;Before I criticize the project, I want to state emphatically that I still believe wholeheartedly in the core principles of OpenStreetMap. We need a Free as in Freedom geographic dataset just as much today as we did in the past. When I wrote my article about OSM in 2012, self-driving cars and other services were still a dream. Today the importance of having a highly accurate, libre geographic dataset is more important than ever, and I support those working to make it happen.&lt;/p&gt;
&lt;p&gt;That said, while I still believe in the goals of OpenStreetMap, I feel the OpenStreetMap project is currently unable to fulfill that mission due to poor technical decisions, poor political decisions, and a general malaise in the project. I'm going to outline in this article what I think OpenStreetMap has gotten wrong. It's entirely possible that OSM will reform and address the impediments to its success- and I hope it does. We need a Free as in Freedom geographic dataset.&lt;/p&gt;
&lt;p&gt;As long as this post is, it's not a comprehensive list of all the problems with the project, only the ones I found most directly affect the project's success and that I wasn't able to address myself during my time on the project.&lt;/p&gt;
&lt;h2&gt;When the World Needs a Map, Give them a Database&lt;/h2&gt;
&lt;p&gt;The first problem that I feel plagues OSM is that the OpenStreetMap Foundation views the mission of the project to provide the world a geographic database, but not geographic services. OSM gives people the tools to create their own map rather than offering them a simple, out of the box solution. Providing the ability for individuals and organizations to make their own map may work well for some, but it discourages small and medium size organizations from using OSM and thus engaging with the project. And even if they do use our data, their engagement is through a third party, rather than directly with us.&lt;/p&gt;
&lt;p&gt;When you go to OpenStreetMap.org, you see a map and a few extras, such as a search window, along with a few extra buttons such as "Log In" and "Edit." It would be reasonable to assume that OpenStreetMap is a map, like Google Maps or other map projects, but while there is a map on OpenStreetMap.org, OpenStreetMap doesn't want you to use it. Instead, they want you to use the information from OpenStreetMap to make your own map, or find someone else to make the map for you.&lt;/p&gt;
&lt;p&gt;If you find this strange or confusing, you're not alone.&lt;/p&gt;
&lt;p&gt;A map is nothing more than a visualization of a collection of facts. We can understand this in terms of geometry. Let's imagine a furniture store called Frita's Furniture. Our map is a simple two-dimensional plane just like we had in geography class, and it's at 10,10. We might also imagine a road called Main Street that runs from location 2, 9 all the way down to 15, 9.&lt;/p&gt;
&lt;p&gt;The location of the store and the road are geographic facts, but if we wanted to represent this data visually, we'd typically use a map. We'd choose just how to draw the road. Would we use a simple line or a more road-line picture? How wide should the line be? What color would it be? Where would we put the name of the road? We could put it across the line, or alongside it, or some other way entirely. And do we want to represent the store as a dot, or an icon of a store?&lt;/p&gt;
&lt;p&gt;Years ago, map makers would handle this process manually, but with computers, we generally call this process map rendering, and there are many decisions around the rendering of a map, such the usage of the map, local conventions and even just keeping within a given organization's map style.&lt;/p&gt;
&lt;p&gt;But most people don't care about any of this. They just want a map. OSM has a map on its website but discourages its use by third parties. Instead, users are expected to either find a commercial service to render the map for them or else do it themselves.&lt;/p&gt;
&lt;p&gt;The project leaders claim that this is because they want people using OpenStreetMap to understand the difference between the geographic data and its visual representation and to encourage a free market ecosystem of rendered map providers, but it's also a fact that many of the individuals who push for this separation also sell commercial map services. I explore this conflict of interest later in this post.&lt;/p&gt;
&lt;h3&gt;Unclear Usage Policies&lt;/h3&gt;
&lt;p&gt;I mentioned earlier that OSM discouraged use of its maps on other websites. It does this through technically enforced usage policies. Understanding a usage policy is usually a straightforward process. An individual or organization gets permission to use a service a certain amount. We could imagine this being done by the number of map requests, or by bandwidth, etc. But OSM's usage policy is entirely different. They allow but discourage the use of the free map and then disallow any single application that is using over 5% of the map bandwidth. This policy is bizarre on several levels.&lt;/p&gt;
&lt;p&gt;To understand why this is so strange, we can use an analogy. Let's imagine that I make ice cream. I put the recipe for my ice cream outside my house and suggest people make their own. I also offer free samples out of my home. Above my door, I hang a sign saying "Please don't ask for free samples". Then when people come in and ask for a sample, I give it to them. People may spread the word about my free ice cream and suggest their friends use it. Imagine we have a person named Fred who is a fan of my ice cream and recommends that all his friends go to my house for ice cream. I continue to dish out free ice cream to anyone who asks. But if one individual like Fred refers too many people to me, I will cut off access to everyone Fred sent.&lt;/p&gt;
&lt;p&gt;Furthering this analogy, I will tell Fred's friends that they've eaten too much free ice cream, instead of telling Fred. And how many people is too many people? The answer for OpenStreetMap is anything over five percent of the total amount of free ice cream that I've dished out that day. Fred has no idea how many people I've served, so the only thing he can do is ultimately not refer people to my house.&lt;/p&gt;
&lt;p&gt;This analogy works because no since no single service knows what any other service is doing, there's no way to know how many other applications have requested how many map requests. Also, since the top services and applications will change over time, you may be fine one day and in trouble the next. Again, there's no way to know. And when you do cross the line of using the service too much, your users would get an unfriendly message about unavailability, not you.&lt;/p&gt;
&lt;p&gt;OSM could create standard usage policy, spelling out exactly how much free usage is allowed. It could also choose to create "premium membership" and encourage people to use its tile service (rendered map) service, but right now, using OSM tiles without going through a third party is hard.&lt;/p&gt;
&lt;h3&gt;A Bad Geocoder&lt;/h3&gt;
&lt;p&gt;When you type an address into a map and it gives you the location, that is called Geocoding. When your GPS or phone knows where you are and gives you a building or street address, that is called Reverse Geocoding. The geocoder featured on OpenStreetMap.org is called Nominatim, and it's awful.&lt;/p&gt;
&lt;p&gt;Nominatim is not the only OSM geocoder. Much like the map rendering, it is possible to write your own or use a commercial geocoding service. But Nomatim is the most popular geocoder available for OpenStreetMap, it's used on the website and Nominatim is the service that is listed on OpenStreetMap.org under its APIs.&lt;/p&gt;
&lt;p&gt;In its defense, let me say that Geocoding is hard and Nominatim itself is quite complex; its almost a feat of engineering. The developers who work on it put enormous effort into writing Nominatim. The problem is that such software needs to be maintained or sometimes replaced entirely to be useful. While there have been Nominatim maintainers, it's not been given the time or attention that it needs and deserves.&lt;/p&gt;
&lt;p&gt;To understand why Nominatim is bad, one has to understand how most people use a geocoder. They're most often looking up a business or something vague like "Staples downtown Springfield". That simple three letter query is asking quite a bit. It is asking the computer to know what Springfield is and to limit the query to that. It's then asking to limit it to (or near!) an area called "downtown", and finally, it's limiting results to Staples.&lt;/p&gt;
&lt;p&gt;But Nomintim can't handle such queries. It can barely handle simple address queries, such as "123 Main Street". As an example, if I typed an address into Nominatim near my location in New York City, it might come up with a result in Iowa, which for whatever reason, it's more inclined to offer me.&lt;/p&gt;
&lt;p&gt;If I try to specify my location as "Manhattan", as of the time of this writing Nomintim will first assume that I mean Manhattan, Kansas, ignoring both the prominence of Manhattan in New York and the fact that the query itself is originating from New York City. Worse still, it's not possible to search for intersections. If I type "53rd and 6th, New York City" into Nominatim, it doesn't understand it. Even if I try to refine the search as "53rd Street and 6th Avenue, New York City", it doesn't work. Intersections are not addresses to Nominatim. It doesn't understand stores, or "near" or categories such as "restaurant". The results it comes up with are often irrelevant, and the service is quite slow.&lt;/p&gt;
&lt;p&gt;While other geocoders for OSM exist, such as Pelias and Photon, only Nominatim is run and supported by the OSM Foundation.&lt;/p&gt;
&lt;h2&gt;No moderation/review model&lt;/h2&gt;
&lt;p&gt;One of the most significant technical problems with OSM is the lack of a review model, that is for a change to the map to be staged and then reviewed before being applied. Not having this functionality caused ripples of problems throughout the system, some of which I'll discuss here.&lt;/p&gt;
&lt;h3&gt;New mapper problem&lt;/h3&gt;
&lt;p&gt;Editing on OSM can be challenging for a beginner, and as the project tried to attract new mappers (editor contributors), we would run into people who just mapped incorrectly. Unfortunately, because OSM's data model doesn't include a review stage bad edits are committed to the map and often left undiscovered, or even if they're removed, the original editor doesn't usually see why.&lt;/p&gt;
&lt;p&gt;Having the ability for a mapper to contribute changes and then have those changes be reviewed would have potentially left the map with higher quality data and a sort of mentorship model between new contributors and more experienced editors.&lt;/p&gt;
&lt;p&gt;I hoped that this would be improved when I mentored a feature placed into OpenStreetMap called "Changeset Comments", in which users could leave feedback for one another's changes. Unfortunately, this ended up not being something many people used constructively, and it was a mess.&lt;/p&gt;
&lt;h3&gt;Without Moderation, Bots are Hard&lt;/h3&gt;
&lt;p&gt;Bots could be very useful in OSM in finding mistakes caused either by inaccurate data sources or by editing blunders. For example, if there was a road named "Main Street" connected to another road called "Main Stret," it was likely a spelling error and should be corrected. But it would be a good thing if changes were reviewed by a human being first.&lt;/p&gt;
&lt;p&gt;But since OSM doesn't provide any mechanism for reviewed edits, these kinds of suggested changes don't exist. Either bot edits are executed without oversight, which could lead to errors, or they aren't done at all and the project misses out.&lt;/p&gt;
&lt;h3&gt;Imports are Difficult&lt;/h3&gt;
&lt;p&gt;Imports are challenging for a variety of reasons, but having a moderation or review model would make things much easier by allowing changes to be staged. The inability to stage and review massive changes to the map have caused problems in the past and many bad imports go unnoticed. If the project instead required that a human review edits before being committed to the system, bad imports could be detected before they cause problems.&lt;/p&gt;
&lt;p&gt;Due to the lack of staging inside OSM itself, staging systems have been written for other OSM related projects. These systems often require editors to then manually place those changes in OSM. This process is labor intensive and makes some imports so challenging that they die before they begin.&lt;/p&gt;
&lt;h3&gt;Vandalism is hard to manage&lt;/h3&gt;
&lt;p&gt;Like Wikipedia, OSM has people who purposefully vandalize the project. Vandals have a variety of motivations. Some vandals are your run of the mill Internet trolls who enjoy causing problems. Sometimes a company wants something on the map despite community consensus against it and change the map to suit their needs, even if the project as a whole is against it. Sometimes mappers use OSM to make political statements such as in the case of disputed territories, and sometimes a geospatially based game, such as Pokemon Go, will use OSM to generate its data and players find that they can change the map to gain an advantage. Whatever the reason, OSM has vandals.&lt;/p&gt;
&lt;p&gt;Vandalism is difficult in OSM because without a moderation system, it has to be "cleaned up" rather than prevented in the first place. Detecting vandalism is difficult. Several people ran monitoring tools to try to find problematic edits and imports. I was one of those people.&lt;/p&gt;
&lt;p&gt;Even if problematic edits are detected, removing then means making even more edits. The history of the project is littered with lots of small changes that are only there to remove some previous change. Worse still, if the vandalism isn't detected early then someone else might modify an object that was previously vandalized, creating a situation in which either a tool or a person would have to separate the good edits from the bad, a manual process that can be labor intensive.&lt;/p&gt;
&lt;p&gt;A moderation tool would prevent much of this. Many vandals would find that their work would not get into the database and would move on. While some malicious edits would still get through, we would be able to address a majority before it became a problem.&lt;/p&gt;
&lt;h3&gt;External Tools are Hard&lt;/h3&gt;
&lt;p&gt;One of my contributions to OpenStreetMap was working to improve MapRoutlette, a tool which helps find problems in OSM and offers users the opportunity to fix them. One feature that we wanted in MapRoutlette was to be able to present users with simple "Yes/No" type questions. Unfortunately, while not impossible this would have been a complicated task in OpenStreetMap. If these edits could have gone to a moderation queue, we could have been more confident, and possibly not needed MapRoutlette at all in some cases.&lt;/p&gt;
&lt;p&gt;Many developers wanted to solve this same problem, offering the ability to add helpful but anonymous edits to the project. But since OpenStreetMap requires every edit be committed by an individual user, rather than a company or bot account, the barrier of entry for casual mappers was often too high.&lt;/p&gt;
&lt;h2&gt;OSM's Lack of Layers&lt;/h2&gt;
&lt;p&gt;Most geographic databases use a layered approach to represent different features. One layer may represent political boundaries; another may represent the road network, a third may represent water features, and so on.&lt;/p&gt;
&lt;p&gt;Instead of the traditional layers, OSM chooses to use a single layer and then tags (key/value pairs) on individual objects. At first this seems like a good idea, but ultimately it ends up creating a huge mess.&lt;/p&gt;
&lt;h3&gt;Tools are Harder to Write&lt;/h3&gt;
&lt;p&gt;Imagine if we wanted to write an editor for OSM that only worked with the road network. This task would seem straightforward in that we would just need to extract features that correspond are tagged as road, such as &lt;code&gt;highway=*&lt;/code&gt;. Unfortunately, it's not that simple.&lt;/p&gt;
&lt;p&gt;First, an editor that edits these road features must not only pick up the roads (&lt;em&gt;ways&lt;/em&gt; in OSM terminology) but also the points (&lt;em&gt;nodes&lt;/em&gt;) that make up that road. Secondly, if the road is particularly complicated, it may be represented as a &lt;em&gt;relation&lt;/em&gt;. Editing this way is time consuming but straightforward.&lt;/p&gt;
&lt;p&gt;What is not as straightforward is that a feature such as a road may also be playing double-duty as another feature, such as a political boundary, as may any of its associated features. Editing roads may inadvertently result in changing a political boundary.&lt;/p&gt;
&lt;p&gt;Having map features that represent such radically different meaning puts an onus on both tool makers and the individual editor working on OSM to be aware of any changes they make possibly having consequences that go beyond what they think they're doing.&lt;/p&gt;
&lt;h3&gt;Imports Are Difficult Without Layers&lt;/h3&gt;
&lt;p&gt;One of the keys of the Free and Open Source software movements have been code reuse, the idea that you can integrate software together from different sources and have it work seamlessly together. One would think that it would be much the same with geographic data, but because of the lack of layers, it's very challenging to import data into OSM.&lt;/p&gt;
&lt;p&gt;Without layers, it's difficult to extract a specific region by feature and analyze or replace that. Instead, because of its complex tagging system, it needs to be analyzed as a whole. Imports are possible but made more difficult without layers to make the job of data analysis by isolation easier.&lt;/p&gt;
&lt;h2&gt;No Support For Observational, or Other Datasets&lt;/h2&gt;
&lt;p&gt;One of the core tenants of OpenStreetMap is that it only stores persistent, personally verifiable data. The only exceptions to this are political boundaries- and even these exceptions can be problematic. Unfortunately, this also presents a problem with third parties want to use OSM for things outside of the project scope.&lt;/p&gt;
&lt;p&gt;As an example, let's take Pokemon Go. Pokemon Go is an augmented reality game in which real-life features are connected with imaginary creatures in which the player must battle and collect. The frequency and location of where these creatures appear is based on various map features.&lt;/p&gt;
&lt;p&gt;Pokemon Go players wanted to use OSM to document the location of creatures to make it easier for other players to find rare creatures and improve their collection. OSM disallows this kind of data in the same way that it might for bird watchers- while it's interesting, the impermanence of this data made it a poor candidate for the project and thus the data would be immediately removed.&lt;/p&gt;
&lt;p&gt;But it doesn't have to be something as trivial as a game- layers could also allow other specialized data such as potholes, red light cameras or even bird or animal sightings. It would make the project useful to many more people.&lt;/p&gt;
&lt;h2&gt;Lack of Permanent IDs&lt;/h2&gt;
&lt;p&gt;In any database, objects have an ID field, usually a numeric value to look the record up by. OSM is no different and every object inside OSM has an ID field. Unfortunately, in OSM the ID fields represent the low-level objects rather than any high-level concept. This creates a huge problem. I will call this idea a "Conceptual Object", and show how the lack of permanent IDs for them is problematic.&lt;/p&gt;
&lt;h3&gt;Diving Deeper&lt;/h3&gt;
&lt;p&gt;To understand why the lack of permanent IDs is a problem, we have to dive a little deeper into how OSM works. While many of these low-level details are beyond the scope of this article, I will present the basics of how OSM stores information. A point in OSM is called a &lt;em&gt;node&lt;/em&gt;, and every node has an ID. Points may be collected into a line, and that line is called a &lt;em&gt;way&lt;/em&gt;, and collections of nodes and ways may be combined into a more complex object called a &lt;em&gt;relation&lt;/em&gt;. A relation may also contain other relations. Nodes, ways, and relations all have ID fields.&lt;/p&gt;
&lt;p&gt;To illustrate this, let's think of a building, that building has properties. The building is at a certain location, it's a specific size, shape, and has an address. If it's large enough, it may have multiple addresses. But the concept of the building is unified. In OSM, that building could be represented by a single node, representing the address. Or a building may be represented by a way of the building outline, or a building may be represented by a relation, encompassing details of the various building elevations, levels, and roof types. The problem is that if I'm doing a lookup, there is no straightforward way to ask about the building. Instead, I will have to look at aspects of the building, such as its address, or its location.&lt;/p&gt;
&lt;h3&gt;History Lost&lt;/h3&gt;
&lt;p&gt;As strange as this may seem, it's entirely possible in OpenStreetMap to take a node from one side of the world, move it to the other side of the world and use it for something else entirely. For example, it is technically possible to take a part of a house, move it to another continent and use it as part of a road. While this is highly unusual, this is not disallowed. If I look at the history of the node, I will see it move. While this may keep the history of the element, it does not keep the conceptual history of an object.&lt;/p&gt;
&lt;p&gt;For example, if we start with a representation of an object being the building as a single node, then move to a complex relation, that won't be reflected in the object history, and thus the changes over time are lost.&lt;/p&gt;
&lt;p&gt;Permanent IDs on conceptual objects could help with this by providing a history of what the data represents rather than just the data itself.&lt;/p&gt;
&lt;h3&gt;Import Conflation&lt;/h3&gt;
&lt;p&gt;Amongst other problems, not having a permanent ID for a conceptual object in OSM is the challenging of conflating objects in OSM to objects in other datasets. For example, if we're given a building database from a local government, each building in that dataset will have an ID. We will want to compare that ID to our existing objects. Unfortunately, to do that, we're left with two choices- either we create a new identifier (key) in which to do the conflation, or we have to use the second dataset's ID inside OSM- neither of which is an optimal solution.&lt;/p&gt;
&lt;h3&gt;It's Hard to Build Connections to Other Datasets&lt;/h3&gt;
&lt;p&gt;Many people have envisioned projects that connect to OSM to offer reviews or other data associated with OSM, but without a permanent ID, this is not practical. Objects in OpenStreetMap may contain some data such as cuisine type or opening hours along with the name and address, but the review site will need to be able to have a permanent link to objects in OSM, which it can't currently.&lt;/p&gt;
&lt;h2&gt;No Standards in Data Representation&lt;/h2&gt;
&lt;p&gt;In OpenStreetMap, there are no formal standards in the project for the representation of features on the map. As an example, let's take the example of a sidewalk. Sidewalks are useful things to have on a map because they tell us if the road is pedestrian friendly. Sometimes sidewalks are represented by an attribute on the road itself. Sometimes sidewalks are represented as a line (way) that runs parallel to the road. Sometimes those ways have the name of the street as their own name, and sometimes they don't have any name at all.&lt;/p&gt;
&lt;p&gt;If you are a mapper, this is confusing, since there's no one standard way to map things. If you're trying to build tools to work with OpenStreetMap, the lack of standardization of data across the project makes it challenging to work with as a whole.&lt;/p&gt;
&lt;p&gt;There is an informal process for data representation, mainly done on the Wiki, but because this isn't formally enforced, and changing data en mass may be considered a form of vandalism, data consumers are forced to write tools that accept many representations of the same data.&lt;/p&gt;
&lt;h2&gt;The APIs are Slow to Evolve&lt;/h2&gt;
&lt;p&gt;As of writing, the current official OpenStreetMap API is 0.6.  The API hasn't version hasn't changed since 2009. While a stable API can be a good thing for a mature software project, in the case of OpenStreetMap, this is as more a reflection of poor project management.&lt;/p&gt;
&lt;p&gt;An API is part of a protocol that either allows a client to talk to a server or for servers to communicate with each other. In this case, we're talking about OpenStreetMap's editing API which is used between OSM and editing software.&lt;/p&gt;
&lt;p&gt;The OpenStreetMap editing API is very powerful and complete, but it has some design choices that made sense in 2009 that have largely been replaced by better technical options in nine years since. These include small changes, such as the data serialization format, as well as more significant changes such as the internal data representation.&lt;/p&gt;
&lt;p&gt;As an example, in 2012 there have been several proposals made to create a new datatype called an a &lt;em&gt;area&lt;/em&gt; that would greatly simplify the representation of certain types of geographic features. Despite this and the offer of technical help, the project has not made any significant progress on this or other important technical issues.&lt;/p&gt;
&lt;h2&gt;OSM has Hidden Gatekeepers&lt;/h2&gt;
&lt;p&gt;Dovetailing on the previous section, we have to ask why the project has not made more technical progress, and the answer is that sadly the keys to the OSM castle largely do not lie in the hands of the OpenStreetMap Foundation, but instead in the hands of one or two individuals who act as gatekeepers to the project's source code and infrastructure.&lt;/p&gt;
&lt;p&gt;While it's not uncommon for a Free Software or Open Source project to have a "Benevolent Dictator for Life", these roles are often replaced by a more formal structure as the needs of the project grow. In the case of OpenStreetMap, there is a formal entity which owns the data, called the OpenStreetMap Foundation. But at the same time, the ultimate choices for the website, the geographic database and the infrastructure are not under the direct control of the Foundation, but instead rest largely on one individual, who (while personally friendly) ranges from skeptical to openly hostile to change.&lt;/p&gt;
&lt;p&gt;As a former professional system administrator, I relate strongly to these types of individuals. At the same time, the desires of them need to be balanced by the overall needs of the project to make progress and keep momentum to keep its userbase happy and engaged.&lt;/p&gt;
&lt;p&gt;That is not the case here, and it's to the detriment of the project.&lt;/p&gt;
&lt;h2&gt;The OpenStreetMap Foundation Culture&lt;/h2&gt;
&lt;p&gt;It would be easy to think about the OpenStreetMap Foundation (the OSMF) as similar to the Wikipedia Foundation, but aside from the high-level view of being the holder of Free Data, the two projects are managed radically differently.&lt;/p&gt;
&lt;p&gt;The Wikipedia Foundation is a multi-million dollar organization that not only manages Wikipedia but other projects as well, such as the lesser known Wikidata and Wikinews. These projects aid in the organization's broad mission to provide high-quality information to the world. To serve this mission, Wikipedia spends a great deal of money on its infrastructure as well as directing and funding development of new tools for the community to use.&lt;/p&gt;
&lt;p&gt;OpenStreetMap, on the other hand, relies primarily on donated hosting services and runs on a shoestring budget. It has no paid employees and does not fund or direct the development of its software base.&lt;/p&gt;
&lt;p&gt;This has lead to some organizations trying to take up the mantle and improve the situation, including an organization that I helped found called OpenStreetMap US, which is a US based non-profit organization focused on promoting OSM in the United States. Among our goals for the organization was to fill in the gaps of development and mapping resources by the OSMF, which we partially succeeded in doing, but because of the fragmentation of organizations, we were less successful than we hoped.&lt;/p&gt;
&lt;p&gt;In addition to OpenStreetMap US and other "chapters" around the world, there is the Humanitarian OpenStreetMap Team, whose mission it is to help promote OSM in developing nations and rally the OSM community during humanitarian crises. There is no reason that HOT needed to be an independent organization other than the unwillingness by the OSMF to expand its role. Even Steve Coast, one of the founders of OpenStreetMap saw and tried to address this problem with his organization, "Map Club."&lt;/p&gt;
&lt;p&gt;The obvious question is why the OpenStreetMap leadership takes the positions that it does, despite the clear need for change. The answers in my view are commercialism in the project, along with a cultural desire to retain the feel of the project's early days.&lt;/p&gt;
&lt;p&gt;While there are companies built around Wikipedia's engine (the Wikimedia Server), there are not many companies making money from repackaging Wikipedia. OpenStreetMap, on the other hand, has a commercial ecosystem around it, largely from the business of creating customized maps for customers.&lt;/p&gt;
&lt;p&gt;Many of the founders of the project, as well as others, have launched commercial services around OSM. Unfortunately, this creates an incentive to keep the project small and limited in scope to map up the gap with commercial services which they can sell. This also applies to HOT, which has a financial incentive to get grant money for itself and not have those resources going to the OSMF.&lt;/p&gt;
&lt;p&gt;In addition to these conflicts of interest is a desire to keep the project small in scope by senior members of the community who see the project as being about people and the mapping hobby and want to avoid imports or other activity that could be seen as removing the human factor from the project. They also see the dangers inherent in creating an organizational structure that demands money and fears it would create a perpetual cycle of needing to find donors simply to support a management layer.&lt;/p&gt;
&lt;p&gt;I disagree and view the lack of a more active structure by the OSMF as the cause of the project's both stagnation and significant commercial influence.&lt;/p&gt;
&lt;h2&gt;The World Had Changed&lt;/h2&gt;
&lt;p&gt;When OSM was launched, governments did not release their data under free licenses. They only began doing so &lt;em&gt;because&lt;/em&gt; OSM exists now as competition. Yet due to the problems I've outlined, OSM imports are difficult, and updating imports, once they get in OSM is nearly impossible. This is a critical problem for the project.&lt;/p&gt;
&lt;p&gt;Similarly, when OSM was launched, drones were not cheap and available. AI wasn't able to do good visual detection of roads, and flying cars were still science fiction. Now all of these tools exist, and yet OSM is still stuck largely editing by hand.&lt;/p&gt;
&lt;p&gt;If OSM relies exclusively on manual labor and be unable to work with other datasets, its data quality will continue to decline and the project will ultimately stagnate and fail.&lt;/p&gt;
&lt;h2&gt;Just the Roadblocks&lt;/h2&gt;
&lt;p&gt;It may appear at first that this article is a comprehensive list of everything I find wrong with OSM. It's not. There are many more concerns I have about the project, but I've limited my article to the scope of concerns I have that I feel are stopping the entire project from progressing. There will be time to fix the small issues if (and only if) the project as a whole succeeds. If it doesn't, then the small nit-picky problems are going to be irrelevant anyway.&lt;/p&gt;
&lt;p&gt;It's my sincere hope that this article will be a call-to-action for OSM. There are many brilliant and inspiring individuals in the project. If I'm am a pun, I hope OSM will once again find its &lt;em&gt;way&lt;/em&gt;.&lt;/p&gt;</content></entry><entry><title>Free Software Call To Action</title><link href="https://blog.emacsen.net/blog/2016/11/27/free-software-call-to-action/" rel="alternate"></link><published>2016-11-27T11:28:00-05:00</published><updated>2016-11-27T11:28:00-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2016-11-27:/blog/2016/11/27/free-software-call-to-action/</id><summary type="html">&lt;p&gt;This last year has been a very difficult one for civil liberties and personal freedoms.&lt;/p&gt;
&lt;p&gt;Donald Trump, the president-elect of the United States, has promised to round up and deport illegal immigrants as well as removing legal immigrants from the US. In addition, and more importantly, he's discussed creating a …&lt;/p&gt;</summary><content type="html">&lt;p&gt;This last year has been a very difficult one for civil liberties and personal freedoms.&lt;/p&gt;
&lt;p&gt;Donald Trump, the president-elect of the United States, has promised to round up and deport illegal immigrants as well as removing legal immigrants from the US. In addition, and more importantly, he's discussed creating a "Muslim Registry" and his cabinet has likened to the US Japanese Internment Camps of WW2, and supports mass surveillance.  Pence, the vice-presidential nominee, supports rolling back protections for gays, lesbians and transgender people.&lt;/p&gt;
&lt;p&gt;With these views espoused by the political leadership, it should be no surprise that hate crimes are on the rise, with the Southern Povery Law Center documenting over 700 hate crimes in just the week after the election.&lt;/p&gt;
&lt;p&gt;Brexit symbolized a change for the United Kingdom, signaling a change from inclusion and connection with Europe to isolationism. Racist and xenophobic statements were part of the campaign to disconnect the UK from the European Union, drawing on ideas that in the past, the United Kingdom was strong, and could be again. In the last month, the UK has passed a law that gives the government not only the ability to track its citizens, but access to all their past activities online, including browser history, emails and other communications.&lt;/p&gt;
&lt;p&gt;Aside from the US, right wing parties are on the rise in Europe, with the rising popularity of Frauke Petry's AfD party in Germany, Norbert Hofer's Austria Freedom party in Austria as well as Marie Le Pen's National Front in France. All of these political movements signal a move away from inclusion and social acceptance and towards isolationism, "traditional values" and the persecution of vulnerable populations such as refugees, immigrants, gays and lesbians, transgender people, people of color, Jews, Muslims, the physically handicapped or the neuro-divergent. If you aren't personally mentioned in this group, it's likely that you know someone who is- and believe me, they, I, am scared.&lt;/p&gt;
&lt;p&gt;We're scared that our lives will be destroyed, that the work we've done to make our lives better will be undone, that marriages will be dissolved, that employment protections will be rolled back and we'll be fired, or worse, that we'll be forcibly taken from our homes, physically attacked or killed.&lt;/p&gt;
&lt;p&gt;With these established facts, what practical steps do we take from here? I outline four practical steps that we Free Software people need to take.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Establish and promote alternative communication platforms&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The first step the Free Software community needs to take is to recognize for ourselves that we need free methods of communication. Freedom is not free unless we can communicate with one another, whether that be messaging, audio/visual communication, or the distribution of static content.&lt;/p&gt;
&lt;p&gt;Because of the enormity of this task, I've broken it down further into smaller sub-tasks.&lt;/p&gt;
&lt;p&gt;A. Promote "small step" improvements in communication security.&lt;/p&gt;
&lt;p&gt;We in the Free Software community have a tendency towards absolutism. There are understandable and justifiable reasons for that, but when the stakes are so high, we must not become so entrenched in [TK!] that we lose the opportunity to help others through smaller steps that they could take right now, without making a major change in their lives.&lt;/p&gt;
&lt;p&gt;Asking all your friends to use OpenPGP and plain text communication might be asking too much, but sending people to &lt;a href="https://whispersystems.org"&gt;Signal&lt;/a&gt; and encouraging them to use it is a good first step. Similarly, encouraging the use of technologies like TOR, and pointing them to the &lt;a href="https://www.eff.org/node/82654"&gt;EFF's Secure Messaging Scorecard&lt;/a&gt; are great ways to make small improvements, which is our first step in making the kinds of progress that we need in ensuring our rights to communicate and congregate freely online.&lt;/p&gt;
&lt;p&gt;B. Test, use and promote more comprehensive communication improvements&lt;/p&gt;
&lt;p&gt;When a new communication platform launches and it respects your privacy, use it, and encourage others to use it. It may be difficult or impossible to get people to add something onto their existing communication platform, but with new platforms come "new rules" and it may be easier to encourage them to switch to a new system than retrofit their old one. You can help test these platforms and encourage their use by example.&lt;/p&gt;
&lt;p&gt;C. Use and Promote Self-Hosted Communication Platforms&lt;/p&gt;
&lt;p&gt;A big problem right now is the use of third party hosted platforms for our communication. Google and Facebook and others are very convenient, but result in a loss of privacy and control. Instead, self-hosted platforms (even on a commercial platform such as a VPS) are better as they decentralize your data.&lt;/p&gt;
&lt;p&gt;If you are in a decision making capacity at your job, neighborhood association or other organization, encourage and support the use of self-hosted tools.&lt;/p&gt;
&lt;p&gt;If you're a developer, consider the ease of use of deploying and maintaining the service for very small groups of 2-20 people. Use defaults that work well for small groups and consider small libraries such as SQLite instead of requiring a standalone database. If you can, provide a containerized version of your application for easy installation.&lt;/p&gt;
&lt;p&gt;If you're a system administrator, consider helping provide helpful tutorials and scripts to make the deployment of software easier.  &lt;/p&gt;
&lt;p&gt;D. Offer support to alternative platforms&lt;/p&gt;
&lt;p&gt;In the 90s, the community had social gatherings called Installfests where people came together to offer technical support and assistence in helping bring new people to Free Software. If we have entirely new operating systems or hardware, we may need to bring these Installfests back, not just for their role in technical assistance but also as an opportunity to make one on one, personal contact and build a local community. It's important for people to feel connected and part of something larger than themselves, and offering physical meetings can play an important role in realizing that goal.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Recognize and support community diversity&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;More than product developers, the Free Software community is built on top of a shared experience and shared culture. Part of that culture is acceptance and welcoming of people who are different from you. We need to stand by our community members, no matter where they're from, their religious background, their gender identity or sexual orientation. We are stronger together.&lt;/p&gt;
&lt;p&gt;While these are nice sentiments, they must also be backed up with action, especially in regards to our most vulnerable populations. In some cases, that may mean codifying these principles into a community statement or code of conduct, but in all cases, it means that if you see something wrong, you need to stand up to it. We need to ensure that the feeling of camaraderie, familiarity and safety that most of us feel within the community is something shared with everyone.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Communicate openly and loudly about the moral, legal and ethical threats to our liberties&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Free Software has always been about more than code, it's been part of a larger moral and ethical framework for understanding the world. We understand the role of Free Software in a larger [TK!] of personal liberties and freedoms. Free Software is a requirement for free communication in the online world. We need to know that our devices are doing what we want them to (and not what someone else might want them to do do). Once dismissed as paranoia, we know for a fact that modern "cloud enabled" devices transmit personal details about us, including our location, our interests and even record us.&lt;/p&gt;
&lt;p&gt;If we value our freedom, we need to be able to establish boundaries around the encroachment on our civil liberties. In this time, when encroachment of civil liberties has become a norm, it is even more important to demonstrate the importance of this issue to other groups, and to build these principles into their mission statements and guidelines. To be clear, this is not about "Run Linux everywhere!", this is about codifying the principles of freedom and liberty in the framework of other organizations and by demonstrating the important of Free Software in carrying out that mission.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Get involved in politics&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;National politics is difficult and often inaccessible, but local politics is often easy to get involved in. Even small towns have many elected positions, and small changes even on a town or city level can make a difference, if only by bringing awareness to an issue. We must get involved in out political process, not by trying to change the minds of politicians from the outside but by being involved in the political process from the inside and using our influence.&lt;/p&gt;
&lt;p&gt;This can be at every level. There are many articles online about getting involved in local politics, so I won't replicate their efforts here.&lt;/p&gt;
&lt;p&gt;We must take a comprehensive approach to taking back our society. We owe it to ourselves and others to get involved not only to make our voices heard, but to protect ourselves and our loved ones.&lt;/p&gt;
&lt;p&gt;We, the Free Software community, are a community of shared values and goals and now, more than ever, we need to turn those ideals into action.&lt;/p&gt;</content></entry><entry><title>Why is SFLC siding with Oracle over Linux developers?</title><link href="https://blog.emacsen.net/blog/2016/02/28/why-is-sflc-siding-with-oracle-over-linux-developers/" rel="alternate"></link><published>2016-02-28T20:36:38-05:00</published><updated>2016-02-28T20:36:38-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2016-02-28:/blog/2016/02/28/why-is-sflc-siding-with-oracle-over-linux-developers/</id><summary type="html">&lt;p&gt;I don't write about politics much on this blog (in fact I haven't
written anything in quite a while), but Free Software is something I
care a great deal about, and so when I see something fishy and
scandalous, I take interest, and that's exactly what's going on with
the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I don't write about politics much on this blog (in fact I haven't
written anything in quite a while), but Free Software is something I
care a great deal about, and so when I see something fishy and
scandalous, I take interest, and that's exactly what's going on with
the Software Freedom Law Center's position on ZFS's license
compatibility with Linux.
&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;If you haven't heard, the Software Freedom Conservancy made a public
statement about ZFS. The facts can get a little complicated but in a
nutshell, Cannonical, the company that makes Ubuntu, is going to
distribute ZFS with the next release of their operating system
(16.04). Unfortunately, ZFS (which is owned by Oracle) is distributed
as a separate module under a licensed called the CDDL, which is
non-GPL compatible. You can read Conservancy's post here:
https://sfconservancy.org/blog/2016/feb/25/zfs-and-linux/&lt;/p&gt;
&lt;p&gt;There's a simple solution to this problem. Since Cannonical can't ship
this code legally without infringing on the Linux (and possibly ZFS)
license, Oracle should simply change the licensing of ZFS from CDDL to
another, GPL-compatible license, either the GPL2 or a permissive
license such as the MIT license. It would be a relatively correction
for Oracle to make and it would allow the distribution of ZFS.&lt;/p&gt;
&lt;p&gt;What's more interesting than this conflict is the response that the
Software Freedom Law Center posted an article on thier website about
the case:
https://softwarefreedom.org/resources/2016/linux-kernel-cddl.html&lt;/p&gt;
&lt;p&gt;I imagine that if you've read it, you're probably thinking that's it's
incredibly well written, but you may feel vaguely dizzy. I understand;
I feel that way too when I read Eben Mogen's writing. His approach to
language can be incredibly inspiring, but at the same time by using so
many words, he creates a cloud of obfuscation of the facts. Usually
I'd say that I'm glad he's on our side, but this post of his is
decidedly not on our side.&lt;/p&gt;
&lt;p&gt;For all its length, the article has two main points. Firstly, it says
that the CDDL (the licensed used by Oracle) is not compatible with the
GPL in fact, but it is so "in spirit". Secondly, it says that the
kernel developers are the problem, not Oracle.&lt;/p&gt;
&lt;p&gt;To the first point, that the CDDL is close in spirit but not in fact
is an odd one for a lawyer to make. As former councel for the FSF,
Moglen has an understanding of the terms of the license that most
people don't have, and he knows very well that once the license is
committed to writing, we use what's written to decide whether or not
something is allowed under the license, rather than the ambigious idea
of "the spirit of the license", which he refers to in his post.&lt;/p&gt;
&lt;p&gt;Which gets to Eben's second point, which is to shift the blame of the
problem onto the kernel developers, rather than onto Oracle. What he's
saying, in essence, is that he would like the GPL to be different than
it is. This reminds me of those people who argue that the GPL is a
de-facto public domain license, due to its spirit. It's not. The GPL
spells out its terms very clearly, and Oracle certainly has lawyers
that understand the GPL.&lt;/p&gt;
&lt;p&gt;Which leads me to my third and final point. Eben Moglen is a
genuis. He's someone that I admire immensely and have at time been
inspired by and aspired to his skills as both a thinker and an
orator. Knowing his history and feeling as I do about him, this post
seems entirely out of character. So then if it's out of character, why
would he do it? Why would he side with a large, powerful corporation
over GPL-using kernel developers? The only conclusion that I can come
to is that he must be recieving money from Oracle. I'd love to be able
to either support or negate this but the Software Freedom Law Center
does not publish the names of the companies that donate to it. In
other words, we can't know what corporate interests have donated to
SFLC because SFLC had decided to not disclose its corporate donors.&lt;/p&gt;</content></entry><entry><title>The Rule of One</title><link href="https://blog.emacsen.net/blog/2015/03/31/the-rule-of-one/" rel="alternate"></link><published>2015-03-31T13:44:10-04:00</published><updated>2015-03-31T13:44:10-04:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2015-03-31:/blog/2015/03/31/the-rule-of-one/</id><summary type="html">&lt;p&gt;If you care about Free and Open Source Software, you probably think
about ways to support the people who write the programs that you rely
on. In this post, I'm going to tell you what I do, and what I hope
others will do too. I call it the &lt;em&gt;The …&lt;/em&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;If you care about Free and Open Source Software, you probably think
about ways to support the people who write the programs that you rely
on. In this post, I'm going to tell you what I do, and what I hope
others will do too. I call it the &lt;em&gt;The Rule of One&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The Rule of One is very simple:&lt;/p&gt;
&lt;p&gt;&lt;q&gt;Whatever you spend on proprietary software, donate that same amount to Free Software causes.&lt;/q&gt;&lt;/p&gt;
&lt;p&gt;If you're well off, you should employ the &lt;em&gt;Rule of Two to One&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;q&gt;Whatever you spend on proprietary software, donate double to Free Software causes.&lt;/q&gt;&lt;/p&gt;
&lt;p&gt;Think about all the times that we buy proprietary software:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Did you buy a game for your smart phone recently? Or for that
  matter, did you buy a smart phone that came with proprietary software
  on it?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Did you buy some proprietary hardware, like a Roku , or maybe a
  "Smart" television? Or even a medical device?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Did you buy a video game or game console system?&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you consider all the times that we either purchase or subsidize
proprietary software, for many of us, it ends up being hundreds,
possibly thousands of dollars a year.&lt;/p&gt;
&lt;p&gt;I'm not telling you to stop buying the things you love. Instead, I'm
saying that whatever you're spending on proprietary software, invest
in creating the Free alternatives.&lt;/p&gt;
&lt;p&gt;If you're not sure how, most of the larger projects have a Donate
button on their home page. Alternatively, here are some organizations
that support Free Software that you should consider donating to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://sfconservancy.org/"&gt;Software Freedom Conservancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://fsf.org"&gt;The Free Software Foundation&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://www.spi-inc.org/&gt;"Software in the Public Interest&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.gnome.org/foundation/"&gt;The GNOME Foundation&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://ev.kde.org/"&gt;KDE e.V.&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.mozilla.org/en-US/foundation/"&gt;The Mozilla Foundation&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</content></entry><entry><title>Modern Web Development with React (Part 4)</title><link href="https://blog.emacsen.net/blog/2015/02/08/modern-web-development-with-react-part-4/" rel="alternate"></link><published>2015-02-08T12:57:13-05:00</published><updated>2015-02-08T12:57:13-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2015-02-08:/blog/2015/02/08/modern-web-development-with-react-part-4/</id><summary type="html">&lt;p&gt;In the &lt;a href="http://blog.emacsen.net/blog/2015/02/06/modern-web-development-with-react-part-3/"&gt;previous post&lt;/a&gt;, we created our first React component. In this
post, we'll build on that and explore the issue of state in React,
embedding components into components as well as React's component
lifecycle.
&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;&lt;a name="immutableproperties"&gt;&lt;/a&gt;
&lt;strong&gt;Immutable Properties&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When we left off, we had explored React's concept of props. Props are …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In the &lt;a href="http://blog.emacsen.net/blog/2015/02/06/modern-web-development-with-react-part-3/"&gt;previous post&lt;/a&gt;, we created our first React component. In this
post, we'll build on that and explore the issue of state in React,
embedding components into components as well as React's component
lifecycle.
&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;&lt;a name="immutableproperties"&gt;&lt;/a&gt;
&lt;strong&gt;Immutable Properties&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When we left off, we had explored React's concept of props. Props are
constants that we can send to a react component at its initialization
time and they remain with the component.&lt;/p&gt;
&lt;p&gt;Properties do not change. If we want to create a component with a new
property, we would create a new component.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default Properties&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Getting back to our &lt;code&gt;Temperature&lt;/code&gt; component, we have to manually set
our temperature property. If we we to fail to set that property, our
web page would break, possibly not showing anything at all, because
the &lt;code&gt;props.fahrenheit&lt;/code&gt; value would be undefined.&lt;/p&gt;
&lt;p&gt;We can set a default property on our component in case a property
isn't sent to it.&lt;/p&gt;
&lt;p&gt;For that, we'll create a &lt;code&gt;getDefaultProps&lt;/code&gt; method, which will return a
Javascript object containing default properties. In our example, we'll
set a default temperature of 72F.&lt;/p&gt;
&lt;p&gt;To do that, create a new method for our &lt;code&gt;Temperature&lt;/code&gt; component:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;getDefaultProps&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="o"&gt;(){&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;fahrenheit&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;72&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;},&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now we can either set the temperature explicitly as we did before, or
we can omit the temperature property and a default value will be set
for us.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Getting dynamic with state&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So far we've been using a static temperature that we've either been
setting manually or using a default value for. Now we're going to
create a component that is more dynamic.&lt;/p&gt;
&lt;p&gt;Let's imagine that we have an RESTful API &lt;code&gt;/temperature&lt;/code&gt; which returns
a JSON response in the form of &lt;code&gt;{"fahrenheit": 80}&lt;/code&gt;. Instead of
setting our component manually, we could use this API endpoint
to set our temperature.&lt;/p&gt;
&lt;p&gt;While we could use props for this, if we only intend to set the
temperature once, we're going to go ahead and use &lt;code&gt;state&lt;/code&gt; instead.&lt;/p&gt;
&lt;p&gt;React components' &lt;code&gt;state&lt;/code&gt; property works similarly to the &lt;code&gt;props&lt;/code&gt;
property except that values in &lt;code&gt;state&lt;/code&gt; are changeable using the
&lt;code&gt;setState&lt;/code&gt; method, which we'll use. It's important to always use
&lt;code&gt;setState&lt;/code&gt; to set the values inside state, rather than trying to set
them directly.&lt;/p&gt;
&lt;p&gt;We'll want to fetch the current temperature as soon as we can. The
best time to do this is right before the component will mount to the
DOM. So we'll set the React method &lt;code&gt;componentWillMount&lt;/code&gt; to retrieve
our value and set the temperature. We'll also change our render method
to use the state, instead of the prop.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;var Temperature = React.createClass({
    componentWillMount: function(){
        request.get(&amp;#39;/temperature&amp;#39;, function(res){
            this.setState({fahrenheit, res.body.fahrenheit})
        }.bind(this));
    },
    render: function(){
        return (
        &amp;lt;h1&amp;gt;The temperature is {this.state.fahrenheit}F&amp;lt;h1&amp;gt;
        )
});
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;What's Happening Here&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Although we made a small change, there's quite a bit to go over.&lt;/p&gt;
&lt;p&gt;Out &lt;code&gt;componentWillMount&lt;/code&gt; method will fire just before the component is
rendered in the browser, and it will send off a RESTful call to the
URL &lt;code&gt;/temperature&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Once that's complete, it will fire off the anonymous function that
we've passed &lt;code&gt;request.get&lt;/code&gt;, which calls the &lt;code&gt;this.setState&lt;/code&gt; method
with the new&lt;code&gt;temperature&lt;/code&gt; property.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;this&lt;/code&gt; returns&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You may notice that we've added &lt;code&gt;.bind(this)&lt;/code&gt;to our anonymous function
call to &lt;code&gt;request.get&lt;/code&gt;. That's because we call the &lt;code&gt;this.setState&lt;/code&gt;
method on it, and &lt;code&gt;this&lt;/code&gt; is always set to the current function
namespace. We can get around that by binding &lt;code&gt;this&lt;/code&gt;, our component, to
the anonymous function- thereby giving it access to all the properties
of our component, including the &lt;code&gt;setState&lt;/code&gt; method.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Look Ma, no render()&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The next thing you may notice is that we didn't explicitly call
&lt;code&gt;render()&lt;/code&gt; after we set our new state. That's because React will do
that for us. Once we set a new state, the &lt;code&gt;render&lt;/code&gt; method will get
re-run and, if necessary, the page will be refreshed. More on this
later in the post.&lt;/p&gt;
&lt;p&gt;If you've had to work directly with DOM manipulation, then you'll see
the clear difference here. We only need to worry about the state of
our component through properties and state, and the component will
take care of its own display.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;There's still a problem&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you run this code, the &lt;code&gt;render()&lt;/code&gt; method will be executed while the
&lt;code&gt;request.get&lt;/code&gt; is still waiting. That's the asynchronous nature of
Javascript, and it's generally a good thing.&lt;/p&gt;
&lt;p&gt;The problem for us is that in the meantime, our &lt;code&gt;render&lt;/code&gt; method will
return something like:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;The temperature is undefined&lt;/code&gt;, or worse, may fail to run at all.&lt;/p&gt;
&lt;p&gt;There are two ways we can solve this. The first is that we can set a
default temperature, and the second is that we can put some logic in
our render method to handle this condition. Let's go through both.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Setting Default State&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To start, let's just set a default temperature just like we did in the
previous post. For that, we'll use the &lt;code&gt;getInitialState&lt;/code&gt; method.&lt;/p&gt;
&lt;p&gt;Add the following method to our component:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;getInitialState&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="o"&gt;(){&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;fahrenheit&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;72&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;},&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;When the component runs, for a brief period, it will display the
temperature as 72 until the request call completes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using logic during render&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Instead of setting a fake temperature value, we can add some logic to
our render method telling the user that we're fetching the
temperature.&lt;/p&gt;
&lt;p&gt;Let's do that using the original component as displayed early on in
the post:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;var Temperature = React.createClass({
    componentWillMount: function(){
        request.get(&amp;#39;/temperature&amp;#39;, function(res){
            this.setState({fahrenheit, res.body.fahrenheit})
        }.bind(this));
    },
    render: function(){
        if (this.state.fahrenheit === undefined){
            return (&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Getting temperature...&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;)
        } else {
            return (
            &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;The temperature is {this.state.fahrenheit}F&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;
           )
       }
});
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now while the request is in process, the message &lt;code&gt;Getting temperature&lt;/code&gt;
will be displayed to the user.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Combining default state with render logic&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It's nice to be able to set a message that the temperature isn't yet
set, but using undefined is probably not a good idea. Instead, let's
set the state of &lt;code&gt;fahrenheit&lt;/code&gt; to null. Because null is distinct from
undefined, we can test for it explicitly.&lt;/p&gt;
&lt;p&gt;So let's do that:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;var Temperature = React.createClass({
    getInitialState: function(){
    return {
        fahrenheit: null
        }
    },
    componentWillMount: function(){
        request.get(&amp;#39;/temperature&amp;#39;, function(res){
            this.setState({fahrenheit, res.body.fahrenheit})
        }.bind(this));
    },
    render: function(){
        if (this.state.fahrenheit === null){
            return (&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Getting temperature...&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;)
        } else {
            return (
            &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;The temperature is {this.state.fahrenheit}F&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;
           )
       }
});
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Flexibility&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We're using the url &lt;code&gt;/temperature&lt;/code&gt; for our RESTful call, but that URL
could be anything. In fact, we could be setting the state from any
function call at all. That's in contrast to some other libraries which
dictate exactly how the server needs to lay out its data. Here, we
have the ultimate control over that and we can choose an API that
makes sense for us.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Multiple components&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So far we've only created a single component, but we can create
multiple components.&lt;/p&gt;
&lt;p&gt;We're going to create one component that displays the temperature in
Fahrenheit and one that displays it in Celsius.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;var Fahrenheit = React.createClass({
    render: function(){
        return (
        &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;{this.props.fahrenheit}F&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
        )
    }
});

var Celsius = React.createClass({
    render: function(){
        var celsius =  (this.props.fahrenheit - 32) * 5 / 9;
        return (
            &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;{celsius.toPrecision(1)}C&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;`It
        )
    }
});

var Temperature = React.createClass({
    componentWillMount: function(){
        request.get(&amp;#39;/temperature&amp;#39;, function(res){
            this.setState({fahrenheit, res.body.fahrenheit})
        }.bind(this));
    },
    render: function(){
        return (
            &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;Fahrenheit&lt;/span&gt; &lt;span class="na"&gt;fahrenheit=&lt;/span&gt;&lt;span class="s"&gt;{this.state.fahrenheit}&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;Celsius&lt;/span&gt; &lt;span class="na"&gt;fahrenheit=&lt;/span&gt;&lt;span class="s"&gt;{this.state.fahrenheit}&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        )
    }
});
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Reusable Components&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Instead of creating the rendered output directly in the Temperature
Component, we now use the Fahrenheit and Celsius components. Using JSX
we can treat these components just like regular HTML in our
application. This level of abstraction is very useful as we build
larger and more complex applications.&lt;/p&gt;
&lt;p&gt;In addition to the ease of creation, we do not need to worry about our
children object's state. That is handled for us in our Render
method. That means that at each component level, we can focus our
attention exclusively on that component without worrying about what
either the parent component or the child component are doing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using Props&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You may notice that we're using props for our temperature display,
rather than state.&lt;/p&gt;
&lt;p&gt;That's because we know that the temperature for each of these
components is not going to change, so props make sense. The props for
the components does not change, instead, new components are generated.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Making our code more clear&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Having the data retrieval in &lt;code&gt;componentWillMount&lt;/code&gt; works, but it's not
entirely clear initially what's going on. Let's make it more clear by
adding a new method to &lt;code&gt;Temperature&lt;/code&gt; that explicitly says that we're
fetching the temperature:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;getTemperature&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="o"&gt;(){&lt;/span&gt;
    &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/temperature&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="o"&gt;){&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setState&lt;/span&gt;&lt;span class="o"&gt;({&lt;/span&gt;&lt;span class="n"&gt;fahrenheit&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fahrenheit&lt;/span&gt;&lt;span class="o"&gt;})&lt;/span&gt;
    &lt;span class="o"&gt;}.&lt;/span&gt;&lt;span class="n"&gt;bind&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
&lt;span class="o"&gt;},&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now we'll reference this method in our &lt;code&gt;componentWillMount&lt;/code&gt;, so it
will become:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;componentWillMount&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="o"&gt;(){&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getTemperature&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
&lt;span class="o"&gt;},&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Custom Methods&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Writing our component this way has an added benefit of more
readability. It's more obvious what's going on now inside of
&lt;code&gt;componentWillMount&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Because React components are normal Javascript objects, we can add new
methods to them. The React framework gives us guidelines but generally
stays out of the way.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Getting Updates to our Temperature&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What if we wanted to get regular updates to the temperature? We can
use Javascript builtin &lt;code&gt;setInterval&lt;/code&gt; to regularly retrieve the
temperature from our API endpoint and update the temperature
accordingly. Now that we have &lt;code&gt;getTemperature&lt;/code&gt; as its own function, we
can do that pretty easily. &lt;/p&gt;
&lt;p&gt;We'll change our &lt;code&gt;componentWillMount&lt;/code&gt; method to add the &lt;code&gt;setInterval&lt;/code&gt;
call. &lt;code&gt;setInterval&lt;/code&gt; returns an identifier to keep track of the timer-
so we'll store that timer in a state variable in case we want to use
it later.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;componentWillMount&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="o"&gt;(){&lt;/span&gt;
    &lt;span class="n"&gt;var&lt;/span&gt; &lt;span class="n"&gt;intervalID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setInterval&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getTemperature&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30000&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setState&lt;/span&gt;&lt;span class="o"&gt;({&lt;/span&gt;&lt;span class="n"&gt;intervalID&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;intervalID&lt;/span&gt;&lt;span class="o"&gt;});&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;So now the component will re-load the temperature from the server
every 30 seconds.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Shadow DOM&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You might think that destroying an old component and creating a new
one would be slow, but React optimizes this by creating a copy of the
DOM in memory and then only editing that DOM. It then create a diff of
the two and only modifies on screen what needs to be changed. This is
done incredibly quickly, so screen refresh times are very short, in
the tens of milliseconds.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cleaning up after ourselves&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In our case, we do not destroy the Temperature component without also
closing the window, but it's possible for us to do so in another
setting. If we were to do that, the browser would still make the
getTemperature call every 30 seconds, because that function is bound
to the &lt;code&gt;window&lt;/code&gt; object, not just the &lt;code&gt;Temperature&lt;/code&gt; instance.&lt;/p&gt;
&lt;p&gt;To address this, let's add a new method to our &lt;code&gt;Temperature&lt;/code&gt; component
that removes the interval call upon component destruction. The method
name for this in react is &lt;code&gt;componentWillUnmount&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;componentWillUnmount&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="o"&gt;(){&lt;/span&gt;
    &lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;clearInterval&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;intervalID&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;},&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now we're free to create and destroy as many &lt;code&gt;Temperature&lt;/code&gt; component
instances as we like.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summing it up so far&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this post we covered using React &lt;code&gt;state&lt;/code&gt;, we covered making
components that have children components, integrating React components
with external data, as well as using the React lifecycle methods to
create methods that execute before and after the component mounts.&lt;/p&gt;
&lt;p&gt;In the next post, we'll go through how React makes forms easier, as
well as touch on using CSS frameworks to help us build our
applications more easily.&lt;/p&gt;</content></entry><entry><title>Modern Web Development With React (Part 3)</title><link href="https://blog.emacsen.net/blog/2015/02/06/modern-web-development-with-react-part-3/" rel="alternate"></link><published>2015-02-06T18:12:44-05:00</published><updated>2015-02-06T18:12:44-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2015-02-06:/blog/2015/02/06/modern-web-development-with-react-part-3/</id><summary type="html">&lt;p&gt;In my &lt;a href="http://blog.emacsen.net/blog/2015/01/07/modern-web-development-with-react-pt1/"&gt;first post&lt;/a&gt;,
I described the benefits of client side Javascript programming. In my
&lt;a href="http://blog.emacsen.net/blog/2015/02/01/modern-web-development-with-react-part-2/"&gt;second post&lt;/a&gt;,
I highlighted some of the differences between React and other
frameworks. Now It's time to get our hands dirty with React. &lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;&lt;a name="setup"&gt;&lt;/a&gt;
&lt;strong&gt;Setting Up&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To follow along the example I'm going to provide, we'll …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In my &lt;a href="http://blog.emacsen.net/blog/2015/01/07/modern-web-development-with-react-pt1/"&gt;first post&lt;/a&gt;,
I described the benefits of client side Javascript programming. In my
&lt;a href="http://blog.emacsen.net/blog/2015/02/01/modern-web-development-with-react-part-2/"&gt;second post&lt;/a&gt;,
I highlighted some of the differences between React and other
frameworks. Now It's time to get our hands dirty with React. &lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;&lt;a name="setup"&gt;&lt;/a&gt;
&lt;strong&gt;Setting Up&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To follow along the example I'm going to provide, we'll use the &lt;a
href="http://facebook.github.io/react/downloads.html"&gt;React Starter
Kit&lt;/a&gt;. Just click the link and download the kit.&lt;/p&gt;
&lt;p&gt;We'll be making an example folder to hold our javascript and web
page. Go ahead and make a directory, for example &lt;code&gt;example&lt;/code&gt; and move
the Javascript files from the &lt;code&gt;build&lt;/code&gt; directory into that folder.&lt;/p&gt;
&lt;p&gt;Next, make a simple HTML page with the following content:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    &lt;span class="cp"&gt;&amp;lt;!doctype html&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;meta&lt;/span&gt; &lt;span class="na"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;utf-8&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;html&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;head&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Hello React&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;./react.js&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;./JSXTransformer.js&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;head&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;app&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;./example.jsx&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;html&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We'll be using &lt;code&gt;example.jsx&lt;/code&gt; for our code. I strongly suggest you use
a JSX aware editor such as Emacs or Vim.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Components&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The core building block of React is that web applications should be
built up of small, composible parts that React calls
"components". For those of you familiar with GUIs, you can think of a component a
bit like a widget, a single contained piece of GUI
functionality. Let's dive in with a simple component that will take no
arguments.&lt;/p&gt;
&lt;p&gt;Let's say that we want to display the weather. Let's create a small
component which we can use to display the current temperature. We'll
call our component "Temperature", and we'll construct it using the
React createClass method, which takes in an object and returns a React
component.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt; var Temperature = React.createClass({
    render: function(){
        return (
            &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;The temperature is: 72F&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
        )
    }
});
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We've hard coded the temperature into the component, but we'll fix
that later. For now let's focus on the construction. We have created
this component using the createClass method and we've given it a
dictionary containing a single key, "render". The render method is
what React will use when displaying our component.&lt;/p&gt;
&lt;p&gt;When our component will render, it will display:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;The temperature is: 72F&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The component won't yet render on the page- for that we need to tell
our component to mount to the DOM.&lt;/p&gt;
&lt;p&gt;You may have noticed that we created a &lt;code&gt;div&lt;/code&gt; with the id &lt;code&gt;app&lt;/code&gt; in our
HTML. We will mount our component at the &lt;code&gt;app&lt;/code&gt; div. We didn't have to
call it app, that's just convention. We could have called it
&lt;code&gt;temperature&lt;/code&gt; or &lt;code&gt;demo&lt;/code&gt; or anything else, but &lt;code&gt;app&lt;/code&gt; is a good
convention to use for the top level of a React application.&lt;/p&gt;
&lt;p&gt;To tell our React application to mount on the &lt;code&gt;app&lt;/code&gt; DOM element, we'll
add this to the end of our Javascript file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;React.render(
    &amp;lt;Temperature /&amp;gt;,
    document.getElementById(&amp;#39;app&amp;#39;)
);
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now that we've done that, we can surf back to our web page in a web
browser and we should see a plain page with our temperature
prominently displayed.&lt;/p&gt;
&lt;p&gt;&lt;a name="props"&gt;&lt;/a&gt;
&lt;strong&gt;Working With Props&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now let's replace that hard coded temperature with one we can set.&lt;/p&gt;
&lt;p&gt;React components can have information sent to them in creation time
through the use of what are called properties. Properties are
constants which we can set at the creation time of the component and
they're stored in the component's &lt;code&gt;.props&lt;/code&gt; property.&lt;/p&gt;
&lt;p&gt;Let's make that component again, but this time we'll get the
temperature as a property:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;var Temperature = react.createComponent({
    render: function(){
        return(
           &amp;lt;p&amp;gt;The temperature is {this.props.fahrenheitF&amp;lt;p&amp;gt;
        )
    }
});
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now, where we mount our component, let's set the &lt;code&gt;Fahrenheit&lt;/code&gt;
property. At the bottom where we mount the component, change
&lt;code&gt;&amp;lt;Temperature /&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;lt;Temperature Fahrenheit=80 /&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now save and reload the page.&lt;/p&gt;
&lt;p&gt;You should see that the temperature is now 80.&lt;/p&gt;
&lt;p&gt;Things are really heating up!&lt;/p&gt;
&lt;p&gt;&lt;a name="curlybrackets"&gt;&lt;/a&gt;
&lt;strong&gt;Working With Curly Brackets&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now let's imagine that instead of just Fahrenheit, we wanted to take
our temperature and display it for people who live outside the US, in
Celsius.&lt;/p&gt;
&lt;p&gt;We can do the temperature conversion right inside our render method!&lt;/p&gt;
&lt;p&gt;So let's go to our render method inside our Temperature component and
change it to:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;var celsius = (this.props.fahrenheit - 32) * 5 / 9;
return (
   &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;The temperature is {this.props.fahrenheit}F/{celsius}C&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If we save and go back to our page, we should see:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;The temperature is 26.666666666666668C&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Since that's not very pretty, we can use the built in Javascript
rounding functions to make that a bit more pleasant to look at:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;var celsius = (this.props.fahrenheit - 32) * 5 / 9;
celsius = celsius.toPrecision(1);
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;And now we should see:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;The temperature is 26.6C&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Much better.&lt;/p&gt;
&lt;p&gt;&lt;a name="templating"&gt;&lt;/a&gt;
&lt;strong&gt;This is not templating&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;At first glance, with these HTML tags and curly brackets it might look
like we're using a templating system and then creating a string to
pass into the DOM, but that's not what's happening here.&lt;/p&gt;
&lt;p&gt;The HTML tags are not raw strings- they are getting pre-processed by
the system and turned into function calls. These function calls are
creating components, just like our components, which in turn get
turned into raw DOM objects.&lt;/p&gt;
&lt;p&gt;In addition, what's inside the curly brackets is not simply string
expansion; it's fully evaluated Javascript that gets run during the
render method's call.&lt;/p&gt;
&lt;p&gt;The HTML-like syntax is called JSX, and it's use use optional but
highly recommended. You can read more about JSX at the &lt;a href="http://facebook.github.io/react/docs/jsx-in-depth.html"&gt;official
documentation&lt;/a&gt;
but the raw javascript code is run through a pre-processor and the XML
syntax is turned into raw Javascript function calls, so a component
that looks like &lt;code&gt;&amp;lt;foo arg={val} /&amp;gt;&lt;/code&gt; turns into something like
&lt;code&gt;foo({arg=val})&lt;/code&gt;. For more information on how JSX works, you can refer
to the official documentation.&lt;/p&gt;
&lt;p&gt;Even though there is additional processing done during the pre-process
phase, there's a huge
&lt;a href="http://jsperf.com/jquery-vs-createelement"&gt;runtime speed advantage&lt;/a&gt;
of creating raw DOM objects rather than placing a string into the DOM. This translates
into a faster application overall.&lt;/p&gt;
&lt;p&gt;In addition, by using JSX, we are more able to model the output that
we want, rather than worrying about the implementation of how the DOM
objects are rendered to the browser, and if we use a
&lt;a href="https://github.com/jsx/JSX/wiki/Editor-Support"&gt;JSX aware editor&lt;/a&gt;,
our XML stands out from the rest of our code, making it easy to identify which
parts of our code are related to rendering things on the screen.&lt;/p&gt;
&lt;p&gt;&lt;a name="this"&gt;&lt;/a&gt;
&lt;strong&gt;What is &lt;code&gt;this&lt;/code&gt;?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You may have noticed that in our render method, I referred to the
Fahrenheit property as &lt;code&gt;this.props.fahrenheit&lt;/code&gt; while I referred to
our celsius variable simply as &lt;code&gt;celsius&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;That's because the Celsius variable was set inside the render
method. The &lt;code&gt;props&lt;/code&gt;, on the other hand, are a property of the
Temperature class itself, and React uses the &lt;code&gt;this&lt;/code&gt; property to refer
to the object.&lt;/p&gt;
&lt;p&gt;If you're familiar with Python or Ruby, &lt;code&gt;this&lt;/code&gt; is somewhat equivalent
to &lt;code&gt;self&lt;/code&gt;. In Javascript, &lt;code&gt;this&lt;/code&gt; will always refer to the function
that's being executed, but &lt;code&gt;this&lt;/code&gt; can be passed around from function
to function through binding. By default, all the methods create by
createClass have &lt;code&gt;this&lt;/code&gt; bound, which gives us access to the properties
of the object.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Next time&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In the next post, I'll describe using state on objects, combining
components and using other React component methods.&lt;/p&gt;</content></entry><entry><title>Modern Web Development With React (Part 2)</title><link href="https://blog.emacsen.net/blog/2015/02/01/modern-web-development-with-react-part-2/" rel="alternate"></link><published>2015-02-01T07:19:52-05:00</published><updated>2015-02-01T07:19:52-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2015-02-01:/blog/2015/02/01/modern-web-development-with-react-part-2/</id><summary type="html">&lt;p&gt;In the &lt;a href="http://blog.emacsen.net/blog/2015/01/07/modern-web-development-with-react-pt1/"&gt;previous post&lt;/a&gt;
in this series, we discussed the history of web applications and the
use of Client-Side MVC. In this post, we'll go through some of the
existing Javascript client side frameworks and how React differs from
these projects and why it's so versatile.
&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;Before we dive into …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In the &lt;a href="http://blog.emacsen.net/blog/2015/01/07/modern-web-development-with-react-pt1/"&gt;previous post&lt;/a&gt;
in this series, we discussed the history of web applications and the
use of Client-Side MVC. In this post, we'll go through some of the
existing Javascript client side frameworks and how React differs from
these projects and why it's so versatile.
&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;Before we dive into the specific web frameworks, let's quickly revisit
the issue of client vs server side applications and logic.&lt;/p&gt;
&lt;p&gt;Using a traditional web application framework, the web pages are
created server side, then sent to the web browser, where they're
rendered.&lt;/p&gt;
&lt;p&gt;To create the web pages, most web frameworks use some sort of
templating engine, which allows the pages to be constructed using
composible parts. Most templating engines allow for constructs such
as inclusion, looping, and an inheritance model.&lt;/p&gt;
&lt;p&gt;Most modern frameworks also use some sort of Object-Relation Mapping
(ORM) between the application and the database, and use some sort of
mapping between application logic and the web server urls.&lt;/p&gt;
&lt;p&gt;In the Client-Side model, we're moving most of this application logic
up to the client, where it will live inside the web browser. Then,
when needed, the client and server will communicate.&lt;/p&gt;
&lt;p&gt;For example, if we were creating a shopping cart application, instead
of creating a product page template and sending that to our user, the
application would request product information from the server, and
the server would return that data, usually in JSON.&lt;/p&gt;
&lt;p&gt;Our product API call might look something like &lt;code&gt;GET /products/123&lt;/code&gt;
and the server would return something like&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;{&amp;quot;id&amp;quot;: 123,
 &amp;quot;name&amp;quot;: &amp;quot;Wizomatic&amp;quot;,
 &amp;quot;description&amp;quot;: &amp;quot;It slices, it dices!&amp;quot;,
 &amp;quot;price&amp;quot; 99.95
 }
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;which would then get turned into a web page.&lt;/p&gt;
&lt;p&gt;This is roughly analgous to how an ORM object would get turned into a
web page in a traditional web framework using templates, except with
the advantages of rendering and caching outlined in the previous post.&lt;/p&gt;
&lt;p&gt;While this series will focus mostly on React, it's worth mentioning
that the are other client-side frameworks, some of which are older
than React, and deserve some examination, such as Backbone.js, Ember
and Angular.&lt;/p&gt;
&lt;p&gt;This post will
focus on the similarities of these frameworks, rather than their
differences. For a more comprehensive view of the differences between
these frameworks,t&lt;/p&gt;
&lt;p&gt;Once we've established that simple templates aren't enough, we need
to consider what to replace it with.&lt;/p&gt;
&lt;p&gt;One of the first templates to answer this question was Backbone.js,
then Ember and Angular.&lt;/p&gt;
&lt;p&gt;These three frameworks are different (their differences are best
captured in &lt;a href="https://www.airpair.com/js/javascript-framework-comparison"&gt;this&lt;/a&gt;
article.&lt;/p&gt;
&lt;p&gt;These frameworks share several fundamnetal concepts which differ from
React. Firstly, they're all full application stack
frameworks. Secondly, they all support the idea of data binding, and
thirdly, they share a lot in common with the MVC design pattern.&lt;/p&gt;
&lt;p&gt;React is largely focused on handling the display and interface parts
of the application. That's different from some of these other
libraries which cover not only display, but also cover things like
object representation and client/server communication. React is
agnostic to these concepts, and you're free to store your objects
however you like, both on the server and on the client side.&lt;/p&gt;
&lt;p&gt;At the same time, if you're coming from one of these existing
libraries, you might at first wonder where a lot of the logic around
object storage and syncronization will go. I'll cover that in a later
post in this series, but the short answer is that the object's
representation can be more flexible without the need for complex
serialization/deserialization methods inside the application.&lt;/p&gt;
&lt;p&gt;This dovetails into the issue of data binding, as data binding
between server and client is a feature of other libraries. If you're
unfamiliar with data binding in Javascript client libraries, it's the
idea that if you have an object in memory on the client side, that
the library will handle syncronizing that object's state with the
server. React does not do this by default, but it is supported when
explicity asked for.&lt;/p&gt;
&lt;p&gt;Lastly, React does not impose the MVC design pattern. Since React is
largely concerned with the View, how you choose to handle the other
apspects of your design are left for the developer to choose. That's
not to say that there aren't conventions and librariies which make
this choice easier- there are libraries like Reflux (which I'll cover
later) and Morearity, which users can choose from and find a design
model that works best for them.&lt;/p&gt;
&lt;p&gt;In fact, it's even possible to use Angular and then choose React as
the view controller. While potentially heavy-weight, this is an
option available to the developer.&lt;/p&gt;
&lt;p&gt;This post has outlined some of the differences between React and
other client side web development frameworks. In the next post, we'll
roll up our sleeves and get our hands dirty.&lt;/p&gt;</content></entry><entry><title>Modern Web Development with React (part 1)</title><link href="https://blog.emacsen.net/blog/2015/01/07/modern-web-development-with-react-pt1/" rel="alternate"></link><published>2015-01-07T14:18:12-05:00</published><updated>2015-01-07T14:18:12-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2015-01-07:/blog/2015/01/07/modern-web-development-with-react-pt1/</id><summary type="html">&lt;p&gt;In this series of posts, I'm going to present modern web development
using React. As I do, I'll touch on the fundamentals of web
development over time, the benefits of client side web frameworks,
the React framework, then other tools in the React ecosystem.
&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;Before thinking about React, let's first …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In this series of posts, I'm going to present modern web development
using React. As I do, I'll touch on the fundamentals of web
development over time, the benefits of client side web frameworks,
the React framework, then other tools in the React ecosystem.
&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;Before thinking about React, let's first about how we would go about
writing a web application without it. The most obvious way we can
write a web application is that we can generate each page as a
document on the server and that document from the server to the
client. This is what we've done since the very beginning with
Perl/CGI, and what we've been doing with frameworks like Ruby on
Rails, and Django, and J2EE, etc.&lt;/p&gt;
&lt;p&gt;In this traditional web framework model, the server keeps the
application state. When a user performs an action, the web browser
notifies the server and the server sends back a new document to
display.&lt;/p&gt;
&lt;p&gt;This traditional model of application development is well understood,
but when we want our web applications to feel "responsive", it begins
to fall down.&lt;/p&gt;
&lt;p&gt;To address the performance issue, the answer for a long time was to
use some Javascript to put some application interactions on the
client, ie the web browser. Since the Javascript will run on the
client's computer, it will appear faster. An early example of this
that I remember is that the javascript would be aware of where on the
page the mouse pointer was and would change the text color when the
user was hovering over some portion of text.&lt;/p&gt;
&lt;p&gt;With the advent of AJAX, the server could now send portions of data
back and forth to the client. This meant that, for example, a post on
a web forum could be sent and the user could submit it without
leaving the page.&lt;/p&gt;
&lt;p&gt;This technique for interacting between server and client grew
increasingly sophisticated and over time, we've seen things change
into the current era of web application development where the bulk of
the visible parts of the application run on the client. These are
often called "Client-Side MVC" web development.&lt;/p&gt;
&lt;p&gt;Client-Side MVC has a number of advantages.&lt;/p&gt;
&lt;p&gt;From a user perspective, a site that resides on the client is going to
be faster and more responsive. Because the majority of the user
interface code is running purely on the user's computer, the site
"feels" more responsive. That's because instead of needing to request
a page, wait for the server to generate the new page, send that new
page and then display it, the web application can stay running while
new data is either submitted to or fetched from the server.&lt;/p&gt;
&lt;p&gt;In addition, because the user interface is separated from the data,
the amount of data transferred between server and client can be
reduced. Even if there's a large initial transfer of code (ie the
application itself), each subsequent transaction between server and
client can include just the data that's changed, rather than every
visual element on the page. This means that even when data needs to be
exchanged between client and server, there's less data to be
transferred and the application feels more responsive.&lt;/p&gt;
&lt;p&gt;Furthermore, keeping the data separate from the display means that the
application can take advantage of caching and other techniques to
reduce the need for client/server communication.&lt;/p&gt;
&lt;p&gt;Lastly, using this technique can lead to more "interesting" user
interfaces and functionality like auto-completion and rich graphical
and textual interfaces.&lt;/p&gt;
&lt;p&gt;From a technical perspective, the server code can be written more in a
more straightforward manner. Instead of needing to process templates
and generate pages, the server can support a simple API that is shared
between it and the client.&lt;/p&gt;
&lt;p&gt;Since all programming libraries are essentially APIs, programmers are
already familiar with using APIs. Because the scope of a particular
API is limited, these web APIs are easier to develop and debug. They
can also provide a clean separation in development between frontend UI
development and backend server development.&lt;/p&gt;
&lt;p&gt;After developing sites with a client-side MVC framework, it's hard to
think of going back.&lt;/p&gt;
&lt;p&gt;In the next post, I'll discuss the various Client-Side MVC frameworks.&lt;/p&gt;</content></entry><entry><title>NYC Blooms with OpenStreetMap</title><link href="https://blog.emacsen.net/blog/2014/12/01/nyc-blooms-with-openstreetmap/" rel="alternate"></link><published>2014-12-01T06:54:16-05:00</published><updated>2014-12-01T06:54:16-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-12-01:/blog/2014/12/01/nyc-blooms-with-openstreetmap/</id><summary type="html">&lt;p&gt;A community mapping project in New York is showing how OpenStreetMap
can not only show how mapping can help people navigate, it can shape
how people perceive their city.
&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/images/community_garden.png" height="422" width="380" align="left" hspace="100" /&gt;&lt;/p&gt;
&lt;p&gt;New York City contains hundreds of
&lt;a href="http://en.wikipedia.org/wiki/Community_gardening"&gt;community gardens&lt;/a&gt;. These
gardens represent the the hard work of thousands of New Yorkers coming …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A community mapping project in New York is showing how OpenStreetMap
can not only show how mapping can help people navigate, it can shape
how people perceive their city.
&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/images/community_garden.png" height="422" width="380" align="left" hspace="100" /&gt;&lt;/p&gt;
&lt;p&gt;New York City contains hundreds of
&lt;a href="http://en.wikipedia.org/wiki/Community_gardening"&gt;community gardens&lt;/a&gt;. These
gardens represent the the hard work of thousands of New Yorkers coming
together to make these spaces come to life, and in some cases growing
their own vegetables to be either given away or sold at local
markets. Yet these gardens don't appear on most maps. Only a few of
them appear on Google Maps, and none of them appear on the New York
City maps, where the community gardens appear as vacant lots. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.meetup.com/osm-nyc/"&gt;OpenStreetMap NYC&lt;/a&gt;, the local
OpenStreetMap community group, in collaboration with
&lt;a href="http://www.grownyc.org/"&gt;GrowNYC&lt;/a&gt;, a New York City based
environmental non-profit, are working to increase the visibility of
these gardens through a collaborative mapping project. GrowNYC has
released their data about New York community gardens to the
OpenStreetMap community to help encourage their inclusion on the
map. Because of OpenStreetMap's flexible way of describing features,
mappers are able to capture not only the name and address of a
community gardens, but also features like the hours that the garden is
open to the public, and even whether or not the garden offers
composting.&lt;/p&gt;
&lt;p&gt;On November 22nd, OpenStreetMap NYC kicked off this collaboration
through a meetup where local community members came together to work
on mapping the gardens. Leading this meetup was Eric Brelsford, a NYC
Mapper and founder of &lt;a href="http://596acres.org"&gt;596 Acres&lt;/a&gt;, a non-profit
dedicated to land use and advocacy issues in New York City and Mara
Gittleman from the
&lt;a href="http://nyccgc.org/"&gt;NYC Community Garden Coalition&lt;/a&gt;, an activist
organization working to protect community gardens in the city.&lt;/p&gt;
&lt;p&gt;This collaboration presents benefits to both GrowNYC and
OpenStreetMap. As Mara Gittleman explains, "Having an up-to-date map
can help gardeners, researchers, and allies make the case for
community gardens to funders and policy makers by showing their
proximity to things like schools, illustrate where they might make up
for lack of access to parks, quantify environmental benefits, etc."
Unlike proprietary maps like those from Google, the maps provided by
OpenStreetMap give direct access to the geographic data, allowing for
all the benefits to researchers and policymakers.&lt;/p&gt;
&lt;p&gt;Using OpenStreetMap also presents benefits for to the community
gardens. Garden organizers and maintainers can now keep the
information about their gardens up to date on their own, without
needing an intermediary. And because OpenStreetMap is used by so many
websites, these community gardens will be getting exposure to millions
more people than they have before.&lt;/p&gt;
&lt;p&gt;Because of its collaborative nature, its purposefully neutral stance
on data and its extensible data representation, it seems likely that
more community groups will use OpenStreetMap to shine a spotlight on
previously invisible features of our world.&lt;/p&gt;</content></entry><entry><title>The Maintenance of Imported Data in OpenStreetMap</title><link href="https://blog.emacsen.net/blog/2014/03/13/the-maintenance-of-imported-data-in-openstreetmap/" rel="alternate"></link><published>2014-03-13T09:10:06-04:00</published><updated>2014-03-13T09:10:06-04:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-03-13:/blog/2014/03/13/the-maintenance-of-imported-data-in-openstreetmap/</id><summary type="html">&lt;p&gt;Some feedback about my &lt;a href="http://blog.emacsen.net/blog/2014/01/25/why-imports-in-openstreetmap-are-controversial/"&gt;previous import post&lt;/a&gt;
was regarding my contention that imported data is harder to
maintain. This conclusion is based on years of observation. In this
post, I'll explain why I believe imported data is not the same as
manually mapped data in terms of maintenance.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;The standard …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Some feedback about my &lt;a href="http://blog.emacsen.net/blog/2014/01/25/why-imports-in-openstreetmap-are-controversial/"&gt;previous import post&lt;/a&gt;
was regarding my contention that imported data is harder to
maintain. This conclusion is based on years of observation. In this
post, I'll explain why I believe imported data is not the same as
manually mapped data in terms of maintenance.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;The standard disclaimer applies here. I am speaking for myself and not
representing any other group. In addition I want to say that this post
is not meant to discourage imports in general, but that if
OpenStreetMap is to have imports, we need to have comprehensive
discussions about the issues around them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Adding vs Correcting&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The most common issue cited about why imported data is harder to work
with is that it's easier to fill in an empty map. This often leads to
the debate about completeness vs accuracy- in other words is it better
to have a map that is full of partially accurate data or one that is
only partially filled but with completely accurate data? This debate
misses the real issue, which is the relative difficulty of adding vs
correcting OpenStreetMap data.&lt;/p&gt;
&lt;p&gt;On a map that is empty, it's easy to see what needs to be added. If a
road or building is not present they can be added. We see this pattern
being played out in OSM as larger, more prominent roads get filled in
first, followed by secondary roads, and finally residential roads,
buildings, POIs, etc.&lt;/p&gt;
&lt;p&gt;The more difficult task is determing what data needs correction on a
map that is visually complete. Looking at this map of Washington, DC,
we see roads, buildings, and a variety of POIs. This map may be out of
date. The speed limits on the roads may have changed, a building may
have been torn down, or a store may have changed names.&lt;/p&gt;
&lt;p&gt;&lt;img src="{{ root_url }}/images/dc-map.png" /&gt;&lt;/p&gt;
&lt;p&gt;It's not possible to determine what information needs correcting
simply by looking at the map, nor is it always possible by looking at
aerial imagery. Updating the map is far more difficult than creating
it.  Either the mapper must know the OSM data is wrong and re-survey
the area, or they are going off newly collected data and the new data
must be reconciled with the old data. For example we might know that a
store is present on a particular street, but to be accurate, we must
know not only that the new store exists, but that it replaced the old
store in the same location.&lt;/p&gt;
&lt;p&gt;When data is imported, the map appears complete, and the burden of the
community effort shifts from collection to maintenance, which is a task
that most mappers are less familiar with. In addition, correcting data
does not have the same &lt;a href="http://weait.com/i-want-to-see-it"&gt;intrinsic motivation&lt;/a&gt;
as first time collection does.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Complex Objects&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The second issue that imports sometimes bring about are complex
objects that are difficult or impossible to fix. &lt;/p&gt;
&lt;p&gt;In this image, we see a section of New Jersey in OpenStreetMap, with
the patchwork of color representing landuse data&lt;/p&gt;
&lt;p&gt;&lt;img src="{{ root_url }}/images/nj-map.png" /&gt;&lt;/p&gt;
&lt;p&gt;When we zoom in, we see one of these objects is a multipolygon
relation, an object composed of several other objects. This
one object references five other objects. In addition, the outer
boundary of this woods shares geometry with about another ten landuse
objects. &lt;/p&gt;
&lt;p&gt;If someone were to try to update the landuse data, they might
unintentionally be effecting up to a half dozen other objects at the
same time, meaning that a simple update process now becomes a
difficult and time consuming process of ungluing multipolygons,
splitting them and trying to reconstruct them.&lt;/p&gt;
&lt;p&gt;For an experienced mapper, this would be a tedious, time consuming
process. For a new mapper, it would be an daunting and possibly
confusing challenge. Most mappers simply avoid the work altogether and
the data is never updated.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Unverifiable Objects and External Unique Identifiers&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The third, and in my view the most common problem we encounter with
imported data is the issue around external identifiers in the imported
dataset.&lt;/p&gt;
&lt;p&gt;Let's start with a simple example of the problem in action: New York
City bike racks.&lt;/p&gt;
&lt;p&gt;&lt;img src="{{ root_url }}/images/bike-racks.png" /&gt;&lt;/p&gt;
&lt;p&gt;As you can see, there are two bike racks on this street according to
the data.&lt;/p&gt;
&lt;p&gt;If one of those racks were found to be missing or in the wrong
location, it would need to be removed. The problem is that it's not
obvious by looking at a bike rack what bike rack is what. What, then
is the solution?&lt;/p&gt;
&lt;p&gt;Taking another example, we see this building footprint from New York
City:&lt;/p&gt;
&lt;p&gt;&lt;img src="{{ root_url }}/images/buildings.png" /&gt;&lt;/p&gt;
&lt;p&gt;Every imported building in New York has a Building Identification
Number, or BIN. In OpenStreetMap we've separated out the
garage from the building, whereas the city hasn't. When merging the
city data with data from local mappers, do we apply the BIN to the
garage? To the main building? To neither?&lt;/p&gt;
&lt;p&gt;A more common example is data imported from GNIS. GNIS data was
imported many years ago and has many known issues associated with it,
including but not exclusively that many of the GNIS points are far
from the actual location of the object, in some cases a half a mile
away.&lt;/p&gt;
&lt;p&gt;Taking a look at
&lt;a href="http://www.openstreetmap.org/node/357581016/history#map=5/34.994/-93.384"&gt;this&lt;/a&gt;
node, just a few weeks ago, this had a GNIS datapoint for a
school. &lt;a href="http://www.openstreetmap.org/user/Korzun"&gt;Korzun&lt;/a&gt;, a very
active mapper, visited the location himself and found out it was a
drug rehab center, but was too concerned about the integrity of the
GNIS import to remove the dataset, even though he knew it to be
inaccurate.&lt;/p&gt;
&lt;p&gt;If an experienced mapper like him is confused, imagine the confusion
of less experienced mappers?&lt;/p&gt;
&lt;p&gt;The end result in all of these situations is out of date, or entirely
inaccurate data in OpenStreetMap.&lt;/p&gt;
&lt;p&gt;To address these issues, I have three practical suggestions.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;We should reduce or eliminate the use of external tags, including
identifiers during imports&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For years, importers have been bringing in external data along with
   the imported data. This data might include collection dates, unique
   identifiers, etc.&lt;/p&gt;
&lt;p&gt;As part of the import review process, OSM has generally been
   reducing the import of much of this data (for example, collection
   dates), but we continue to import external identifiers. The idea
   behind including the external identifiers is that it's hoped that
   at some future time, we'll be able to do an update based on a new
   dataset and use the external identifier as part of that process.&lt;/p&gt;
&lt;p&gt;Unfortunately, while this possibility has been discussed a number
   of times, in the nearly ten years of the project, no one has
   successfully been able to make this happen. The reason is that even
   if an external identifier is consistent across revisions (which is
   not always the case), OSM activity does not lend itself well to
   using the external ID as the only identifier in the merge process.&lt;/p&gt;
&lt;p&gt;OSMers may decide to add features that are not present on the map
   between imports, or may decide that a feature which has a single
   identifier in the external dataset should be represented in OSM by
   more than one object (eg splitting a road, or separating two
   buildings connected by a skybridge). It's even possible that a
   mapper will accidentally modify a tag that they do not
   understand. This was quite common when &lt;a href="http://openstreetmap.us/2013/05/road-not-rd/"&gt;bot-mode&lt;/a&gt;
   expanded names across the US. Many times it was unable to fix a
   road simply because the TIGER tags had been edited by a mapper who
   did not understand them.&lt;/p&gt;
&lt;p&gt;Because of this, merges must take other factors in consideration
   when doing a merge, including the feature name and location. While
   slower, these methods prove superior during a merge- leading back
   to the original question of why use the unique identifier in the
   first place if it creates confusion (leading to stale data) and
   does not offer benefits in the long run.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Imported data must always be imported by hand, and not by script&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When imports began, the process for getting the external data into
   OSM was that the data was converted into OSM and then simply placed
   into OSM. As we discussed earlier, it is easier to add good data
   than correct bad data so we should take advantage of this in future
   imports.&lt;/p&gt;
&lt;p&gt;We have tools to make this easier, including the &lt;a href="http://wiki.openstreetmap.org/wiki/OSM_Tasking_Manager"&gt;OSM Tasking Manager&lt;/a&gt;,
   which is being used in such an import now. Updating OSM this way
   not only gives an import more review, but can also be used a means
   of engaging users, as was shown in the Seattle import.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;An import proposal must be accompanied by a means of updating the
data in the future&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;OpenStreetMap is only valuable if the data on it is not only
   complete, but current, and we've seen through OSM that data from
   imports is not often updated. We need to change this, and the best
   way to do it would be to require that any import specifically
   address future updates.&lt;/p&gt;
&lt;p&gt;If possible, that process will not only involve conflating the data
   from the external dataset with OSM, but continuing to keep OSM
   contributors engaged in OSM editing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Imports have their place in OSM, but they are not without their
perils. I've tried to outline specifically how the past and current
import process does not serve either data consumers nor the OSM
community in general, as well as provided concrete suggestions on
moving forward. I hope that we can continue to make OSM not only the
freest, but the best geographic dataset in the world.&lt;/p&gt;</content></entry><entry><title>Esperanto After Four Weeks</title><link href="https://blog.emacsen.net/blog/2014/02/13/esperanto-after-four-weeks/" rel="alternate"></link><published>2014-02-13T09:38:48-05:00</published><updated>2014-02-13T09:38:48-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-02-13:/blog/2014/02/13/esperanto-after-four-weeks/</id><summary type="html">&lt;p&gt;I'm into my fourth week of Esperanto and I thought I'd write some
reflections on the process, the struggles and successes.
&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Methods&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;My main method of learning Esperanto is the site
&lt;a href="http://lernu.net"&gt;lernu.net&lt;/a&gt; and its "Bildoj kaj demandoj" (Pictures
and Questions) course. In addition, I've gotten some help from …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I'm into my fourth week of Esperanto and I thought I'd write some
reflections on the process, the struggles and successes.
&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Methods&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;My main method of learning Esperanto is the site
&lt;a href="http://lernu.net"&gt;lernu.net&lt;/a&gt; and its "Bildoj kaj demandoj" (Pictures
and Questions) course. In addition, I've gotten some help from
Esperanto speakers, and I've been listening to Esperanto music from
&lt;a href="http://muzaiko.info/"&gt;Muzaiko&lt;/a&gt;, as well as the
&lt;a href="https://www.esperanto-usa.org/en/node/551"&gt;Esperanto-USA&lt;/a&gt; podcast.&lt;/p&gt;
&lt;p&gt;Lastly, when specific questions arise, I've been using the &lt;a href="http://donh.best.vwh.net/Esperanto/rules.html"&gt;16 Rules
of Esperanto Grammar&lt;/a&gt;,
the &lt;a href="http://www.gutenberg.org/ebooks/16967?msg=welcome_stranger"&gt;English-Esperanto Dictionary&lt;/a&gt;,
and on occasion, simply using Google Translate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Quantity&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I don't study Esperanto every day, but I do lessons about three or
four times a week, at least. The amount of time I spent depends on how
quickly I feel I'm absorbing the lessons. If I'm understanding the
lesson well, I do more, and if I'm having trouble, I go slower.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Process&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For me one of the more illuminating experiences has been in seeing how
my own mind handles the new material. Esperanto is quite easy, but
occasionally I find myself having difficultly with the
material. Lernu has been an incredible resource for that. Using Lernu,
I'm able to set my own pace, learn as much as I can, and then put the
computer away. When I'm ready to take on the next lesson, it's there
for me.&lt;/p&gt;
&lt;p&gt;In addition, after each section, the software gives small
quizzes. Each quiz question covers material in the previous lesson. If
you struggle with a question, the software offers you the opportunity
to see various ways the question can be answered.&lt;/p&gt;
&lt;p&gt;In order to get the feel of the spoken language, I listen to Esperanto
music and spoken Esperanto in the podcasts. In order to get the
"mouth feel", I try to speak every section out as I go along in the
lessons. Lernu provides audio for every question/answer pair, which
makes it easy to repeat as I go along.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Results&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I've worked my way through about two thirds of the basic language
course.&lt;/p&gt;
&lt;p&gt;In just four weeks of learning Esperanto, I can pick up on about 20%
of the Esperanto USA podcast. It's not enough to get the gist of the
conversation, but it's enough to pick up meaning here and there. In
terms of reading, I'm at about the same level. I can figure more from
context and the use of a dictionary, but it's very slow.&lt;/p&gt;
&lt;p&gt;On the positive side, I feel that I've been able to learn at a very
steady pace and I feel comfortable learning more, which is good
because there's a lot more to learn.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Meta-learning&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In addition to just learning Esperanto, I've learned a lot about how I
learn languages, which was a big part of this experiment.&lt;/p&gt;
&lt;p&gt;Spelling is a major issue for me, even in English, and Esperanto
hasn't been an exception. Even though Espernato is entirely phonetic,
I often make simple mistakes, spelling "ĉi" as "ĉe", or "li" as "le",
or transposing two letters.&lt;/p&gt;
&lt;p&gt;Vocabulary has been a mixed bag. Many of the words in Esperanto share
a root either with English or Latin, making them easy to
remember. Some words have no equivalent, and those words require work
to memorize. A technique that I've found very helpful is to use either
a mnemonic device to help me memorize a word until the word can "stand
on its own". For example the word for "when" is "Kiam", and I
remembered that by knowing the root "ki"- followed by "am", which
reminds me of "AM/PM". I was struggling with "kvar", the number four,
and so I visualized the band &lt;a href="http://en.wikipedia.org/wiki/Gwar"&gt;Gwar&lt;/a&gt;
and imagined that there are four members. The fact that there are
actually five members of Gwar is unimportant, since it's the
connection that I'm trying to build. For the word "mateno" (morning),
I associated it with the English word "maternity", which I associate
with birth, visualizing the day being born. And lastly, I remember the
word "pilko" (ball) by thinking of
&lt;a href="http://media.joe.ie/wp-content/uploads/2013/09/karl2.jpg"&gt;Karl Pilkington&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The Lernu site has tests, and a majority of the questions that I've
gotten wrong have been spelling errors, followed by forgetting the
correct tense of a word, followed by forgetting a word
altogether. This mirrors my experience in English, where even today, I
misspell words or forget a word in the middle of a sentence
occasionally. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Conclusion After Four Weeks&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I've been really happy with this experiment, both in learning
Esperanto, and learning about my own learning process. I think the
Esperanto is going at a speed I can expect based on the time I put
into it, and as I go, I'm learning an enormous amount about myself in
language acquisition.&lt;/p&gt;</content></entry><entry><title>Why Imports in OpenStreetMap Are Controversial</title><link href="https://blog.emacsen.net/blog/2014/01/25/why-imports-in-openstreetmap-are-controversial/" rel="alternate"></link><published>2014-01-25T21:05:35-05:00</published><updated>2014-01-25T21:05:35-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-01-25:/blog/2014/01/25/why-imports-in-openstreetmap-are-controversial/</id><summary type="html">&lt;p&gt;OpenStreetMap's goal is to map the entire world, so one might assume
that anything that would help give the project a leg up would be
welcome, but what many potential importers find is that the OSM
community, in particular the more senior members, are hostile to
imports. Understanding their strong …&lt;/p&gt;</summary><content type="html">&lt;p&gt;OpenStreetMap's goal is to map the entire world, so one might assume
that anything that would help give the project a leg up would be
welcome, but what many potential importers find is that the OSM
community, in particular the more senior members, are hostile to
imports. Understanding their strong feelings can be difficult, but I'm
going to take a look at the issues around imports in the community,
and why they're so controversial.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;Before I go on, I need to make clear that the views in this post are
my own and don't reflect the views of the DWG, the OSMF, OSM US or any
other organization.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OSM's Construction&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;OpenStreetMap is a single unified geographic dataset. As a
consequence of its design, it's far more integrated than even
professional GIS maps are. For example, you can't simply remove all
the roads objects in OSM, because those road objects might be
connected to other objects, such as political boundaries, or natural
features. Most professional GIS maps use a system of layers which are
placed on top of one another. In contrast, OSM maps are more like a
complex weaved material, with geographic features intertwined with
each other.&lt;/p&gt;
&lt;p&gt;This makes some operations in OpenSteetMap very easy. If a political
boundary runs along a river, for example, as the river becomes more
detailed, so does the political boundary. At the same time, it poses a
set of challenges for imports.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Licenses&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The most common problem with a data import into OpenStreetMap are
licensing conflicts. In an ideal world government datasets would be
released into the public domain. Unfortunately this is the exception
rather than the norm. In the United States most states and
municipalities do not release their geographic datasets to the public
without restrictive licenses and expensive license fees.&lt;/p&gt;
&lt;p&gt;Some municipalities are trying to make their data more available but
do not use standard licenses. Instead, most US municipalities
create their own licenses from scratch, oftentimes with conflicting
terms. It's not uncommon for a municipal website to say that the data
is in the public domain in one part of the website, but then another
part of the website will say that the data is under copyright and may
not be used or distributed without explicit permission.&lt;/p&gt;
&lt;p&gt;The situation in the US mirrors much of the rest of the world, where
national or local governments struggle between "openness" and
"control".&lt;/p&gt;
&lt;p&gt;The result for OpenStreetMap is that getting a license situation clear
is difficult or sometimes impossible. Because of the way OSM data is
so heavily integrated, removing it afterwards is nearly impossible, so
the project needs to be extremely careful beforehand about the license
situation for any imported data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Official vs Authoritative&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The second challenge or imports is the issue of official vs
authoritative data. Most people assume that if a dataset is official
that means that the data is of extremely high quality. This can be
true, but more often than not, the official dataset is not what one
would expect.&lt;/p&gt;
&lt;p&gt;When a government creates or maintains a dataset, it does so with a
specific purpose in mind. For example, in the US TIGER dataset, the
purpose of the data is to provide a mapping of roads in order for
census employees to know where to look for houses. The TIGER dataset
needs to be complete enough for the census takers, but that is not the
same as being a comprehensive road network map. For example, if a
house exists at the end of the road, it does not matter to a census
taker if the road has a slight bend in it or not.&lt;/p&gt;
&lt;p&gt;Similarly, other data sets are often created to meet a very specific
need. In order to meet that need, a local government will often
outsource the task of surveying, or will hire low wage employees to do
the data collection. The results of the survey need to be consistent,
and governments often provide exhaustive procedures and checklists, but
only for the specific objective they're trying to meet.&lt;/p&gt;
&lt;p&gt;This difference in mapping objectives often comes out in address
data. A government dataset may provide addresses as points on a map
but it's often unclear what these points correspond with. Do they
correspond with the geometric center of a building, or do they
correspond with an entrance? If they correspond with an entrance, what
do they do in cases where the building has multiple entrances?&lt;/p&gt;
&lt;p&gt;In practice we find that such datasets are often complete in that they
show all the addresses, but are inconsistent in where the address
points are placed across buildings.&lt;/p&gt;
&lt;p&gt;This issue of accuracy and consistency becomes more pronounced on
larger, national datasets. A national dataset often consists of a
collection of regional datasets, each which have been collected by
different individuals and organizations, leading to inconsistency.
Paradoxically the national datasets are the ones that OpenStreetMap
members are most interested in, since they can provide the most
information.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Doing it Right&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once the issues of license and data quality are addressed, there are
questions of how to get the data into OSM. As mentioned earlier, one
can't simply add external data onto OSM- the data needs to be
integrated.&lt;/p&gt;
&lt;p&gt;This integration consists of many highly technical, highly detail
oriented steps. Every new importer believes that the integration step
will be easy, but the fact is that the process is difficult and
tedious.&lt;/p&gt;
&lt;p&gt;OpenStreetMap is full of very badly imported data, and suffers from it
to this day.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Corrections and Updates&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately, even after nearly a decade, no one has found an ideal
solution to this problem. The result is usually that data imported
into OSM never gets updated and the imported data in OSM becomes wrong
very quickly.&lt;/p&gt;
&lt;p&gt;When considering updates, as discussed previously, we cannot assume
that an administrative database is correct. Ideally we want OSMers to
map the areas themselves, and it's inevitable that they will do so,
leading to a conflict between the two datasets.&lt;/p&gt;
&lt;p&gt;OSMers have oscillated between trying to update data based on
government datasets and always assuming that local changes are
correct. Neither of these techniques will work in every case. Instead,
a mapper will need to check the conflict manually, preferably by
manually surveying the area.&lt;/p&gt;
&lt;p&gt;This process of updating is slow and tedious and has only happened in a
handful of cases.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Community Helping or Harming&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Within OpenStreetMap there is a debate on whether or not imports help
or harm the OpenStreetMap community.&lt;/p&gt;
&lt;p&gt;OpenStreetMap works because its members are constantly adding and
correcting information in the system. If there were no community
members collecting this data, the map would quickly suffer bitrot,
where old data sticks around and is not replaced with current, up to
date geographic information.&lt;/p&gt;
&lt;p&gt;Because of that, some members believe that efforts should be focused
not on bringing data in from external sources, but on growing the
community of mappers. Others believe that "seed data" provides a
starting point for more mapping, especially in places that have not
been very active in OpenStreetMap previously.&lt;/p&gt;
&lt;p&gt;I'm not going to rehash these arguments here, but I will say that the
role of imports in OpenStreetMap remains contentious, and an area of
research that I would like to see explored is the rate of update
between manually surveyed and imported data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;OpenStreetMap only works because of our community of many thousands
of dedicated mappers who spend their time updating our map. Whatever
the role of imports today or in the future, they can never be a
substitute for on the ground mapping, which needs to remain a
cornerstone of our efforts in OpenStreetMap.&lt;/p&gt;</content></entry><entry><title>Fearing French and Embracing Esperanto</title><link href="https://blog.emacsen.net/blog/2014/01/23/fearing-french-and-embracing-esperanto/" rel="alternate"></link><published>2014-01-23T14:01:10-05:00</published><updated>2014-01-23T14:01:10-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-01-23:/blog/2014/01/23/fearing-french-and-embracing-esperanto/</id><summary type="html">&lt;p&gt;This post is about why I fear French, and what my attempt at taking
this problem on has taught me. This is one of the most personal blog
posts I've made in several years, but in it are lessons for nearly
everyone, especially if you are considering learning a second …&lt;/p&gt;</summary><content type="html">&lt;p&gt;This post is about why I fear French, and what my attempt at taking
this problem on has taught me. This is one of the most personal blog
posts I've made in several years, but in it are lessons for nearly
everyone, especially if you are considering learning a second language&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;&lt;strong&gt;[UPDATE 01-25-2014]&lt;/strong&gt;: There seems to be some confusion about my use of the term 
"polyglot" in this post. I am not equating programming languages with 
spoken languages. I am comparing the introduction of a new skill in an 
existing domain. Also, I'm referencing a talk by Adam Jacob, a well 
known member of the system adminstrator community about how we system 
administrators are "polyglot programmers".&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;My Background&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I was born just outside of Paris in 1978. My father was French, and my
mother is an American who went to Paris to perfect her art and ended
up marrying a Frenchman. They intended to spend the rest of their
lives in Paris and so when I was born, they decided to make English
the "home language"- thereby ensuring my fluency.&lt;/p&gt;
&lt;p&gt;When I was just over two years old, my parents moved to the United
States, and while I had been absorbing French, I wasn't any more
fluent than any other two year old. English remained our home language
in the US.&lt;/p&gt;
&lt;p&gt;French was spoken in my home, but it was never spoken to me. My
parents used it to communicate with each other as a sort of secret
code. They did this in delicate situations outside, but they also used
it to argue in front of me so that I couldn't understand them.&lt;/p&gt;
&lt;p&gt;The attitude my parents took was that I should learn French- but that
I should do so on my own. My father recorded &lt;a href="https://en.wikipedia.org/wiki/French_in_Action"&gt;French in Action&lt;/a&gt; off the
television for me and asked me to watch it.&lt;/p&gt;
&lt;p&gt;Every few years, I would return to France with my family and be
reminded by my grandparents and uncle that I should speak French, and
that it was a shame, or a failing, that I didn't.&lt;/p&gt;
&lt;p&gt;I took a French class in college, and it also used French in Action,
and I learned only marginally more than I had before, from watching
the course on television- which is very little. While I could
understand the lessons, the structure of the quizzes and the time
allotted meant that I had virtually no time to figure it out. I'd
misread or misunderstand a question, get the first five answers wrong,
then I'd figure it out and get most of the next ones correct. But the
professor never took that into consideration, and I failed each
quiz. Each failure meant each time, I was increasingly deflated, and
eventually I fell behind. Even if I had aced the final exam, I would
have failed the course due to the quizzes.&lt;/p&gt;
&lt;p&gt;What makes this tragic is that I am, in fact, a French citizen.&lt;/p&gt;
&lt;p&gt;And as a French citizen, I'm required to fill out paperwork in
French. Years of anxiety and shame have left me with a feeling of
dread on the topic. Even writing this out, I feel my jaw clench and
the tips of my fingers become numb.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Polyglot&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Switching gears, as &lt;a href="https://twitter.com/adamhjk"&gt;Adam Jacob&lt;/a&gt; would
say, I am a polyglot. I do not speak any other natural
language, but I able to program competently in four programming
languages, as well as another half dozen with some help.&lt;/p&gt;
&lt;p&gt;In addition to programming, I was a system administrator for over a
decade, where it was my job to work on vastly different systems and in
some cases make them communicate with each other.&lt;/p&gt;
&lt;p&gt;How could it be that I could excel at quickly understanding and
working with computer languages and systems, but with spoken language
be nearly crippled. Certainly this was indicative of something being
wrong.&lt;/p&gt;
&lt;p&gt;I needed to figure out what the connection, or more accurately the
disconnection was between these two skills.&lt;/p&gt;
&lt;p&gt;Mastering a spoken language and programming a computer are entirely
different, but the essence of my search is not comparing the two, but
rather comparing learning an additional programming language with
learning an additional spoken language.&lt;/p&gt;
&lt;p&gt;The programming languages people may be familiar with are things like
C, C++, Java or Python. All of those languages are popular, and all of
them are similar. But there are other programming languages too, such
as Javascript, Clojure, Haskell, Erlang and Prolog. You may have heard
of Javascript, but it's less likely that you're familiar with the
others. Programming in any of these languages is different than
programming in Java. Each requires learning not just a syntax, but a
change in programming style altogether. Each of these languages will
teach you a new way of interacting with the computer and a new way of
thinking about computer programming.&lt;/p&gt;
&lt;p&gt;Of the languages listed, I only know Clojure and Javascript, but I'm
confident that I could learn any of the languages I mentioned because
I've made the leap in the past. I've learned new programming languages
successfully, even when they required a major change in mindset.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rethinking Language Learning&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;How could I transfer my computer language skills to spoken language?&lt;/p&gt;
&lt;p&gt;There were lots of TED talks on this very subject.&lt;/p&gt;
&lt;p&gt;Chris Lonsdale says &lt;a href="http://www.youtube.com/watch?v=d0yGdNEWdn0"&gt;you can be fluent any language in six months&lt;/a&gt;, and Conor Quinn
says I can &lt;a href="http://www.youtube.com/watch?v=6a6vVIdQBd0"&gt;start speaking in 10 days&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Benny Lewis talks about
&lt;a href="http://www.youtube.com/watch?v=0x2_kWRB8-A"&gt;hacking language learning&lt;/a&gt;
and Sid Efromvich has &lt;a href="http://www.youtube.com/watch?v=-WLHr1_EVtQ"&gt;5 techniques to speak any language&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you're interested in language acquisition, I suggest watching all of
these talks, as they each teach something different and complementary,
but what they had in common was:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Communicate as early as you can, even if you aren't speaking&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Don't be afraid to make mistakes, because it's inevitable&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Learn/speak in a way that's relevant to you personally&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Retrain your ears and your mouth&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Language acquisition is a skill&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Language acquisition is a skill that's best learned when we're
mentally at ease&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For me, those last two were the most important.&lt;/p&gt;
&lt;p&gt;Knowing that language acquisition itself is a skill changes the
process from "Learning French" to "Learning Language Acquisition", and
all of those years of shaming, whether by family or academia, helps
explain why that process has been so difficult.&lt;/p&gt;
&lt;p&gt;There were two ways to approach this problem. The first was to try to
emotionally move past the issues I've had with French and try again,
the other option was to learn an entirely different language in order
to gain the skills of language acquisition and then apply those skills
to French. As you might guess from the title of this post, I opted for
the second and decided to learn Esperanto.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Esperanto&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The natural question at this point is either "Why Esperanto?" or
possibly "What is Esperanto?"&lt;/p&gt;
&lt;p&gt;Esperanto is a &lt;a href="http://en.wikipedia.org/wiki/Constructed_language"&gt;constructed language&lt;/a&gt;, in other
words it's a language which was created by a person or persons
intentionally, rather than having developed naturally over hundreds or
thousands of years as most languages do.&lt;/p&gt;
&lt;p&gt;I'd known &lt;em&gt;about&lt;/em&gt; Esperanto for many years. It's mentioned casually in
the BBC show Red Dwarf, where all the &lt;a href="http://reddwarf.wikia.com/wiki/Esperanto"&gt;ship's signs&lt;/a&gt; are posted in both English and Esperanto. I'd also heard about it because more than a few
students from Central and Eastern Europe that I knew spoke about it,
but I didn't think anything of it.&lt;/p&gt;
&lt;p&gt;It's only now with the convergence of my interest in learning French
and my reading &lt;em&gt;Land of Invented Languages&lt;/em&gt; which has sparked my
interest. As a practical exercises in language acquisition, Esperanto
comes with some very impressive credentials.&lt;/p&gt;
&lt;p&gt;The aforementioned Benny Lewis
&lt;a href="http://www.fluentin3months.com/2-weeks-of-esperanto/"&gt;claims that just two weeks of Esperanto can get you months ahead in your target language&lt;/a&gt;,
Esperanto USA claims that Esperanto is &lt;a href="http://www.esperanto-usa.org/node/77"&gt;four times easier to learn&lt;/a&gt; than any other language,
and Wikipedia has an &lt;a href="http://en.wikipedia.org/wiki/Propaedeutic_value_of_Esperanto"&gt;extensive article&lt;/a&gt;
on the foreign language benefits of Esperanto.&lt;/p&gt;
&lt;p&gt;This idea is summarized well by this talk by Tim Morley entitled
&lt;a href="http://www.youtube.com/watch?v=8gSAkUOElsg"&gt;Teach Esperanto First&lt;/a&gt;,
where he describes the process of teaching children Esperanto in order
for them to gain language acquisition skills, applicable in any
language.&lt;/p&gt;
&lt;p&gt;This idea of a simplified first language resonated with me, just as I think that Python is a great
&lt;a href="http://blog.emacsen.net/blog/2014/01/03/python-for-adults/"&gt;first programming language&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There are many resources for learning Esperanto online, including and
especially &lt;a href="http://lernu.net/"&gt;lernu.net.net&lt;/a&gt;, which I have been
using. In addition, there are books online, including audiobooks at
&lt;a href="https://librivox.org"&gt;LibriVox&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why Esperanto is Easy&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I've been using the Lernu online course for about two weeks now and I
have to say that it's been wonderful. Along with some basic
understanding of the &lt;a href="http://en.wikipedia.org/wiki/Esperanto_grammar"&gt;Esperanto grammar&lt;/a&gt;, I've been
able to learn an incredible amount in a very short time. The language
is extremely &lt;a href="http://en.wikipedia.org/wiki/Elegance"&gt;elegant&lt;/a&gt; in that
every word is constructed from a root word and then modified using a
series of simple prefixes or suffixes.&lt;/p&gt;
&lt;p&gt;From a vocabulary perspective, Esperanto is also very easy as most of
the words have a Latin, German or English root, and because English is
composed so largely of French and German roots already, it makes
acquisition that much easier. For example the word for dog is &lt;strong&gt;hundo&lt;/strong&gt;
(nouns all end in -o), the root being the German "hund", which in
English became "hound", and so on.&lt;/p&gt;
&lt;p&gt;Between the partially familiar vocabulary and the simple rule based
word construction, understanding Esperanto is fairly
straightforward. Obviously mastering any language takes time, but
Esperanto gives the learner a step up at each hurdle.&lt;/p&gt;
&lt;p&gt;Even the simple words have hints about their meaning in them. The word
&lt;strong&gt;kio&lt;/strong&gt; such as in the sentence &lt;em&gt;"Kio estas tio?&lt;/em&gt; (What is that?) vs
the word &lt;strong&gt;kiu&lt;/strong&gt;, such as in the &lt;em&gt;"Kiu estas tiu?"&lt;/em&gt; (Who is
that?). The -o at the end of kio indicates that the question is a
"What", which is the same as the -o ending used by all nouns. The -u
indicates a pronoun question, "Who". But just by remembering the -o
noun rule, one can differentiate the two words.&lt;/p&gt;
&lt;p&gt;The phonetics of Esperanto are fairly easy. Each word is spelled
phonetically, with no silent letters, two letter combinations or verb
modifiers. The sounds used in the language are relatively familiar to
English speakers who've listened to European languages and are easy to
pick up.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Esperanto Challenges&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are a few challenges with learning Esperanto. Because it's an
auxiliary language, there are fewer people using it every day for one
on one interactions and so you see less original culture in Esperanto
than you do in a natural language.&lt;/p&gt;
&lt;p&gt;In addition, because Esperanto is usually learned as a second
language, it's slightly more difficult to train your ears and your
mouth to the language because each Esperanto speaker has a slightly
different accent based on their linguistic or geographic
background. Even the few &lt;a href="http://en.wikipedia.org/wiki/Native_Esperanto_speakers"&gt;native speakers&lt;/a&gt;
purportedly have slightly different accents. This is somewhat offset
by the fact that most Esperanto is spoken relatively slowly in the
various recordings that I've heard.&lt;/p&gt;
&lt;p&gt;All in all, the downsides issues are minor compared to the ease of
language acquisition that Esperanto provides, and there is a lot more
in Esperanto than in other constructed languages such as such as
Lojban, Ido or Interlingua. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt; Learning Esperanto&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you want to learn Esperanto, I recommend the course I'm taking at
&lt;a href="http://en.lernu.net/kursoj/bkd/index.php"&gt;Lernu&lt;/a&gt;, followed up by
checking out this &lt;a href="http://esperanto.lodestone.org/ligoj/"&gt;amazing resource&lt;/a&gt; of links to travel
groups, books and podcasts in Esperanto from the Esperanto club at the University of Rochester.&lt;/p&gt;
&lt;p&gt;I have a long way to go until I'm fluent in Esperanto, but I feel that
with a new framework for examining language learning as well as the
experience of Esperanto under my belt, I will be in an excellent place
to not only speak with other Esperanto speakers, but to be able to
tackle my fears of French.&lt;/p&gt;
&lt;p&gt;Ĝis la revido!&lt;/p&gt;</content></entry><entry><title>Edit Wars in OpenStreetMap</title><link href="https://blog.emacsen.net/blog/2014/01/17/edit-wars-in-openstreetmap/" rel="alternate"></link><published>2014-01-17T22:12:07-05:00</published><updated>2014-01-17T22:12:07-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-01-17:/blog/2014/01/17/edit-wars-in-openstreetmap/</id><summary type="html">&lt;p&gt;Reading the feedback from my &lt;a href="http://blog.emacsen.net/blog/2014/01/04/why-the-world-needs-openstreetmap/"&gt;Why The World Needs OSM&lt;/a&gt; post has been
enlightening. One criticism of OSM that has come up multiple times is
the concern about &lt;a href="http://en.wikipedia.org/wiki/Editor_war"&gt;edit wars&lt;/a&gt;
like those seen in Wikipedia. It's a topic that I know something
about, both as a long time OSM contributor …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Reading the feedback from my &lt;a href="http://blog.emacsen.net/blog/2014/01/04/why-the-world-needs-openstreetmap/"&gt;Why The World Needs OSM&lt;/a&gt; post has been
enlightening. One criticism of OSM that has come up multiple times is
the concern about &lt;a href="http://en.wikipedia.org/wiki/Editor_war"&gt;edit wars&lt;/a&gt;
like those seen in Wikipedia. It's a topic that I know something
about, both as a long time OSM contributor, and also as a
&lt;a href="http://wiki.openstreetmap.org/wiki/Data_working_group"&gt;DWG&lt;/a&gt;
member. This post explores how common edit wars are and the
circumstances that surround them.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;Before I go any further on this topic, I want to state for the record
that the opinions expressed in this post are my own and don't reflect
the DWG or the OpenStreetMap Foundation in any way.&lt;/p&gt;
&lt;p&gt;OpenStreetMap DWG members operate similarly to &lt;a href="http://en.wikipedia.org/wiki/Wikipedia:Administrators"&gt;Wikipedia Administrators&lt;/a&gt; - we handle issue of users breaking community standards
and intervene in issues of conflict resolution. We don't enforce any
particular mapping conventions, but we do enforce community
guidelines.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What are the kinds of editing conflicts seen in OSM?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The most common conflict is around the issue of data imports. OSM is
not a collection of information sources, but a single unified dataset
where geographic objects interlock. Because of this, and because of
OSM's emphasis on primary sources and community mapping, imports are
very difficult to do right. In response, OSM has a set of &lt;a href="http://wiki.openstreetmap.org/wiki/Import/Guidelines"&gt;import guidelines&lt;/a&gt;
which must be followed. When they are not, the DWG steps in and
enforces that the guidelines are met.&lt;/p&gt;
&lt;p&gt;The second most common place that the DWG steps in is
&lt;a href="http://wiki.openstreetmap.org/wiki/Vandalism"&gt;vandalism&lt;/a&gt;. Vandalism
is purposefully editing the map in a way that doesn't reflect the
reality. OSM community members often fix small mistakes by newbies or
small scale vandalism. The DWG often gets called in to fix larger
scale vandalism, usually by drive-by troublemakers.&lt;/p&gt;
&lt;p&gt;The third most common type of case that the DWG handles are around
tagging conflicts. Tagging is the process of classifying
objects. OpenStreetMap uses a free form folksonony and sometimes
disputes arise about how to classify certain features. I hesitate to
call this an edit war because it is almost always a single user whose
views differ from those in the rest of the community.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What about actual edit wars?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Actual edit wars do occasionally come up, but they almost always
involve political disputes. One group believes that an area of land
belongs to them, and or has a certain name, while another group
believe that they own the land, and or it has a different name and the
two sides cannot come to consensus. In this special case, the DWG has
special
&lt;a href="http://wiki.osmfoundation.org/w/images/d/d8/DisputedTerritoriesInformation.pdf"&gt;policies&lt;/a&gt;
laid out from the Foundation in how these delicate situations are
handled.&lt;/p&gt;
&lt;p&gt;When an edit war happens, the DWG gets involved, but the frequency of a
genuine edit war is very low, on the order of one edit war every six
months or longer. It's far less frequent than what someone outside the
project may imagine.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why are edit wars so common in Wikipedia, but so uncommon in
OpenStreetMap?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Wikipedia edit wars concern two issues, facts and presentation. In
particular, Wikipedia relies on &lt;a href="http://en.wikipedia.org/wiki/Wikipedia:Identifying_and_using_primary_and_secondary_sources"&gt;secondary sources&lt;/a&gt;. When
two facts collide, an editor must decide which source is
better. OpenStreetMap relies instead on primary sources of
contributors visiting an area and editing OSM to reflect what they
see. Secondary sources are considered inferior and many OSMers use the
derogatory term &lt;a href="http://wiki.openstreetmap.org/wiki/Armchair_mapping"&gt;armchair mapping&lt;/a&gt; in
reference to using these sources. Because of this, when a conflict
arises, the person who visits the location is going to be given
deference over any other source, even officially published government data.&lt;/p&gt;
&lt;p&gt;As for presentation, Wikipedians may argue over the best way to write
a paragraph, or where to list a particular fact. In OSM the general
rule is to update wrong information, and to add detail when you
can. &lt;/p&gt;
&lt;p&gt;I think that our policies around ground observable truth are the main
reason why edit wars are infrequent and almost always concern
political boundaries, which are the one feature that OSM maps that is
not ground verifiable.&lt;/p&gt;
&lt;p&gt;The other reason that I believe edit wars are less common in OSM is
that OSM has a higher bar required for editing. OSM does not allow
anonymous edits, and unlike Wikipedia. If a particular user is causing
problems, they can be easily identified.&lt;/p&gt;
&lt;p&gt;Additionally, OSM is quite a bit smaller than Wikipedia. Even though
OSM has over 1.2 million user accounts, on a daily basis only about
2000 users ever edit the map. While 2000 is certainly not a small
number, it's relatively easy to spot a troublemaker. But even then, a
single user cannot start a war- someone who changes large parts of the
map on their own is an isolated vandal, while actual edit wars would
require at least two parties. This virtually never happens.&lt;/p&gt;
&lt;p&gt;When another editor makes a change to something I've created, in every
case I've seen, they've enhanced the map. Either they've expanded on
the data that I entered or they corrected a mistake I made. This is
the norm in OpenStreetMap- additive and corrective edits. Edit
conflicts are so infrequent that most users will never encounter them,
and even to the group that oversees them, they're a special
case. It's possible that as OSM grows that the number of edit wars
will increase, but I don't think that's likely, as we haven't seen the
number of edit wars grow despite the project's growing success over
the years. Instead, I think that the source of edit wars, that is the
number of geopolitical conflicts is going to be a better predictor of
the trend.&lt;/p&gt;</content></entry><entry><title>The Role of the Fringe</title><link href="https://blog.emacsen.net/blog/2014/01/14/the-role-of-the-fringe/" rel="alternate"></link><published>2014-01-14T08:15:27-05:00</published><updated>2014-01-14T08:15:27-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-01-14:/blog/2014/01/14/the-role-of-the-fringe/</id><summary type="html">&lt;p&gt;I'm in the process of reading &lt;em&gt;In The Land of Invented Languages&lt;/em&gt;- an
excellent book I will write more about. For this post,
I want to focus on how Esperanto's community is like our Free
Software/Free Culture community and the role of the fringe element.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;Reading about Esperanto and …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I'm in the process of reading &lt;em&gt;In The Land of Invented Languages&lt;/em&gt;- an
excellent book I will write more about. For this post,
I want to focus on how Esperanto's community is like our Free
Software/Free Culture community and the role of the fringe element.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;Reading about Esperanto and the struggles it's had over the years to
be taken seriously in spite of a "fringe element" who are both
exuberant in speech (and dress) as well as philosophically motivated
reminded me of the struggles the Free Software movement. In
fact these two movements are more similar than dissimilar in many
ways. The answer to why this is this touches on the very core of both
communities, which is the social cohesion between people who believe
that they are changing the world. &lt;/p&gt;
&lt;p&gt;The Free Software community has without a doubt changed the world. The
Internet as we know it is built on and with Free Software. Billions of
people use Free Software every day, either directly or indirectly, and
Free Software has changed the dialog about the underlying assumptions
our society holds about issues of morals and economics and how those
underlying assumptions shape our actions and our laws, both as
a group and as individuals.&lt;/p&gt;
&lt;p&gt;Esperanto speakers set out to change the world by creating a unified
language that cast off previous cultural influences. Esperantians
wanted a neutral language in order to share their culture to the
world using a dialect that wasn't shaped by any particular kind of
thinking.&lt;/p&gt;
&lt;p&gt;Both movements have been shaped and proselytized by those espousing
its practical benefits over its philosophical ones. In the Free
Software community, we have the Open Source movement, which has
arguably overshadowed the older Free Software movement. In the
Esperanto community, similar arguments broke out amongst its members.&lt;/p&gt;
&lt;p&gt;In both communities, community members and community leaders
complained about "the fringe", those members, often men, who didn't
take their grooming too seriously, who dressed in odd outfits (in the
case of Esperanto, lined with green stars- the Esperanto symbol),
etc. Anyone who has spent a significant amount of time in either
community probably knows what I'm talking about, and have had the same
thoughts along the lines of "How can we be taken seriously with these
people?" If you haven't had that thought, then you're probably one of
the people everyone else is thinking this about.&lt;/p&gt;
&lt;p&gt;The answer is tricky. After seventeen years in the Free Software
community, I know without a doubt that these people have scared others
away. In particular they've scared away people who weren't affluent,
white, eccentric males. But on the other hand, they're the ones who
still come to all the events and who speak publicly about the Free
Software movement's philosophical underpinnings.&lt;/p&gt;
&lt;p&gt;With any peaceful group that is trying to change the world, maybe
these people are inevitable. The question for the rest of us is how
to grow the community to be large enough that others aren't scared
off, and that everyone has a home.&lt;/p&gt;</content></entry><entry><title>The Scoop on Cat Litter</title><link href="https://blog.emacsen.net/blog/2014/01/12/the-scoop-on-cat-litter/" rel="alternate"></link><published>2014-01-12T11:09:35-05:00</published><updated>2014-01-12T11:09:35-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-01-12:/blog/2014/01/12/the-scoop-on-cat-litter/</id><summary type="html">&lt;p&gt;It's time to take a break from the high minded to the mundane. Today
I'm doing a review of cat litter!&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;I have two wonderful cats, one male and one female, both about one
year old, both about 7lbs, and both adopted from the
&lt;a href="http://www.aspca.org/nyc"&gt;ASPCA&lt;/a&gt;.Since I've owned cats as …&lt;/p&gt;</summary><content type="html">&lt;p&gt;It's time to take a break from the high minded to the mundane. Today
I'm doing a review of cat litter!&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;I have two wonderful cats, one male and one female, both about one
year old, both about 7lbs, and both adopted from the
&lt;a href="http://www.aspca.org/nyc"&gt;ASPCA&lt;/a&gt;.Since I've owned cats as an adult,
I've been searching for the perfect cat litter. I've tried six
different litters so far, with varying results.&lt;/p&gt;
&lt;p&gt;My regime is to scoop the cat box once a day, and replace the litter
about once a week, adding more cat litter as necessary to replace
what's been used up. I have a very large &lt;a href="http://www.natures-miracle.com/products/cat-litter-boxes/hooded-litter-box-with-cover-for-multiple-cats.aspx"&gt;cat box&lt;/a&gt;,
which can easily hold 20lbs of clay litter.&lt;/p&gt;
&lt;p&gt;Living in Manhattan, there is a premium on space, and so a cat litter
needs to do excellent odor control, more than it might if I lived in a
larger space and could put the cat box in a more out-of-the-way spot.&lt;/p&gt;
&lt;h1&gt;Feline Pine&lt;/h1&gt;
&lt;p&gt;The first cat litter up is the &lt;a href="http://www.felinepine.com/"&gt;Feline Pine&lt;/a&gt;. This is what the local ASPCA uses,
so I thought it would be a good idea to use the same product during
the cats' transition. This is a dust free, chemical/fragrance-free
product made from wood.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt; I like that this is an all natural product, made from a
  renewable resource. It also scooped/sifted well.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt; The product smelled a bit like used cat litter (ammonia) to
  me even when just out of the bag. I thought the smell would
  dissipate but it just saturated the apartment and I had to get rid
  of it.&lt;/p&gt;
&lt;p&gt;It also didn't do any clumping, although the company apparently also
  makes a &lt;a href="http://www.felinepine.com/products/feline-pine-clumping-litter.aspx"&gt;clumping version&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Overall:&lt;/strong&gt; 2 out of 5. Of all the products, this one irritated me
  the most even when brand new. I like the idea that it's all natural,
  but ultimately the product needs to be something I can live with.&lt;/p&gt;
&lt;h1&gt;World's Best Cat Litter&lt;/h1&gt;
&lt;p&gt;The next product on my list is &lt;a href="http://www.worldsbestcatlitter.com/"&gt;World's Best Cat Litter&lt;/a&gt;, another all natural
(corn based) product. I've met several people who use World's Best and
it seems to have a good reputation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt; The biggest advantage to World's Best is that it's
flushable. You can simply scoop, sift, and toss out kitty waste along
with your own. It won't clog or damage your pipes. It's also all
natural, uses no artificial chemicals or perfumes. It also claims to
be longer lasting than other products.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt; Firstly, and most importantly, I was unhappy with the odor
control. After a few days, the ammonia from the cat box smelled
throughout the apartment. Secondly, the litter tracked throughout the
entire apartment and were a mess to find/clean up. Thirdly, the urine
clumps sometimes crumbled on their way to the toilet.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Overall:&lt;/strong&gt; 2 out of 5. I wanted very much to like this product, but it
  disappointed me. It worked better than Feline Pine, and it is
  environmentally friendly, but the odor control and tracking issues
  need addressing. &lt;/p&gt;
&lt;h1&gt;Yesterday's News&lt;/h1&gt;
&lt;p&gt;The third product on the list is &lt;a href="http://www.yesterdaysnews.com/"&gt;Yesterday's News&lt;/a&gt;. This product is different than
the other products in that it's made from recycled newspapers, formed
in pellets, rather than in small granules like the other litters.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt; This product uses recycled newspaper, which is good
environmentally. It's also dust-free, just like the World's Best and
Feline Pine. It's also completely odorless.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt; This product does a decent job of odor control for a few
days, but after that, the urine soaked newspaper pellets at the bottom
of the litter lose their appeal quickly. The product is also not
siftable- the pellets are too large. One of my cats cries when he
walks on the product, and after accidentally stepping on a few stray
pellets in the apartment, I cry too.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Overall:&lt;/strong&gt; 2 out of 5. I love the idea of using recycled newspaper,
  and it does provide some odor control, but not nearly enough to make
  up for its inability to be scooped and sifted.&lt;/p&gt;
&lt;h1&gt;Fresh Step Unscented Clay Litter&lt;/h1&gt;
&lt;p&gt;The online reviews suggested that Fresh Step is the best cat litter
available, but people complain about the perfume, saying it has a
chemical odor. I decided to try the Fresh Step Unscented Litter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt; Odor control at last! Of all the cat litters I've tried,
this one does the absolute best in controlling odor. Even when
cleaning/sifting, it reduces the odor to a very controllable
level. It's easily siftable, it clumps fairly well, and it doesn't
track as much as some of the other litters.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt; Firstly it should be noted that clay cat litter is mined,
and is generally not considered
&lt;a href="http://www.greenlivingtips.com/articles/Cat-litter-and-strip-mining.html"&gt;environmentally friendly&lt;/a&gt;. On
a personal level, this product is particularly dusty- the most dusty
of all the products I've used. Pouring it out or sifting it releases a
cloud of cat-litter dust into the air each and every
time. Additionally, it does have a tendency to clump on the bottom of
the pan and need to be scooped up forcibly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Overall:&lt;/strong&gt; 3 out of 5. If it weren't for the environmental damage of
this litter, I'd rate it at least a 4, but it's created through strip
mining. In addition, I'm not thrilled with the dust that it
generates. Other than that, this is my favorite litter to use and
until I find something better, is the litter I will have on standby
due to its odor control and siftability.&lt;/p&gt;
&lt;h1&gt;PetCo Refillable Unscented Cat Litter&lt;/h1&gt;
&lt;p&gt;Once I tried the Fresh Step, I thought about cheaper alternatives. I
am not generally a fan of PetCo due to their &lt;a href="http://slumz.boxden.com/f610/petco-throws-live-baby-iguana-dumspter-2000314/"&gt;live animal policies policies&lt;/a&gt;
as well as some horror stories I've heard about their store in DC, but
there's a store across the street from my apartment and they offer a
refill program where you can buy a box of cat litter, then refill it
for less than the price of a new box. I decided to give the &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt; This product is very inexpensive. It's the cheapest of all
  the products I've used, and the cats don't seem to mind it. It looks
  and feels very much like the Fresh Step, though less dusty.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt; It doesn't do as good a job at odor control as the Fresh
  Step. After about 3 days, despite daily cleanings, it smelled. It's
  not as bad as some of the other litters, but it's a significant
  difference from the Fresh Step. Additionally, it's another clay
  litter, with no indication that it's not made from the strip mining
  process.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Overall:&lt;/strong&gt; I'll give this product a 2 out of 5. Like the Fresh Step,
  it loses a point for being environmentally unfriendly, and it looses
  an additional point for being bad at odor control, but it's also
  less dusty and cheaper than Fresh Step. I've had to knock another
  point down for finding out that this product is just regular bags of
  cat litter &lt;a href="http://myplasticfreelife.com/forum/rant-rant-rant/not-bulk-litter-shame-on-petco/"&gt;dumped into a bin&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;I still have another half a container of the PetCo cat litter, which I
will use up in the next week. I also want to try a silica based cat
litter, one of the "Natural" labeled Fresh Step products, the
"Advanced Formula" World's Best Cat Litter, and the Blue Buffalo Cat
litter, so stay tuned for an update in a couple of months.&lt;/p&gt;
&lt;p&gt;If none of these products works out, I will use the Fresh Step product
since it's the best at odor control. In the meantime, if you're a cat
litter company who wants me to try their product, don't hesitate to
contact me!&lt;/p&gt;</content></entry><entry><title>How Sirius/XM mis-handles customers</title><link href="https://blog.emacsen.net/blog/2014/01/11/how-sirius-slash-xm-mis-handles-customers/" rel="alternate"></link><published>2014-01-11T07:34:52-05:00</published><updated>2014-01-11T07:34:52-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-01-11:/blog/2014/01/11/how-sirius-slash-xm-mis-handles-customers/</id><summary type="html">&lt;p&gt;I had a recent experience with Sirius/XM that I think is a great
lesson in how not to handle your customers.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;Let's face it, Sirius/XM has an uphill battle in terms of
entertainment. They have dozens of music channels, but a subscription
to Pandora or Spotify will take …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I had a recent experience with Sirius/XM that I think is a great
lesson in how not to handle your customers.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;Let's face it, Sirius/XM has an uphill battle in terms of
entertainment. They have dozens of music channels, but a subscription
to Pandora or Spotify will take care of all your music needs. What's
left, and what's unique about the service is the premium content, the
things you can't hear anywhere else.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;+1 Sirius&lt;/strong&gt;: Offer me a product I want&lt;/p&gt;
&lt;p&gt;And that's why I enjoyed the service, for stuff I couldn't hear
anywhere else. But the service was a pain in the butt to use. I didn't
own a radio, so I had the Internet only service. But unlike a radio
stream from &lt;a href="http://somafm.com/"&gt;SomeFM&lt;/a&gt; or
&lt;a href="http://www.live365.com"&gt;Live365&lt;/a&gt;, or even my local &lt;a href="http://www.wbai.org/"&gt;Pacifica station&lt;/a&gt;, I couldn't just tune in and listen. I
had to use a complicated web app on my computer, and I couldn't keep
it on in the background because it would sign me out automatically
after a while.&lt;/p&gt;
&lt;p&gt;I could use an app on my phone, but I couldn't listen to Sirius on my
Roku player, my Samsung Smart TV, my Boxee box or my homebuilt XBMC
box. Somehow, three separate video services are able to deliver
thousands of TV shows and movies to me, but Sirius can't deliver audio
to me. Roku has sold over &lt;a href="http://techcrunch.com/2013/04/10/roku-hits-5m-streaming-players-sold-in-the-u-s-has-streamed-8b-videos-and-music-tracks/"&gt;five million&lt;/a&gt;
units, but Sirius still seems focused on the car market, rather than
offering entertainment anywhere.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;-1 Sirius:&lt;/strong&gt; Offer your product as many places as possible&lt;/p&gt;
&lt;p&gt;I mentioned earlier that Sirius has music, but it also has talk
services from NPR, PRI and the BBC. But like music, all of those
services offer live streaming, or better yet, podcasts. With podcasts,
I can listen to the shows whenever I want, stop them, rewind them, or
even share them with friend- all for free.&lt;/p&gt;
&lt;p&gt;With the Sirius/XM premium content, I can't even choose to stream the
content when I want. By comparison to modern content delivery systems,
Sirius feels like a step backwards.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;-1 Sirius&lt;/strong&gt;: Offer the product in a form your customers want it&lt;/p&gt;
&lt;p&gt;Because Sirius is such a pain to use, I simply forgot to turn it on
for about six months. Every month, I dutifully (auto)paid my
bill. But after my credit card changed, the autobill stopped working,
and I received a call at 6pm someone saying they were from Sirius/XM
and wanting to talk to me about my bill.&lt;/p&gt;
&lt;p&gt;I told her that I didn't have time to talk at the moment, but that I
didn't want to use the service anymore, so I'd like to cancel. She
said that she'd done it, but I still had the matter of my outstanding
bill. I told her I'd take care of that online.&lt;/p&gt;
&lt;p&gt;She ended the conversation with "I'll call you tomorrow." I told her I
didn't want her to call tomorrow- that I'd take care of it on my own.&lt;/p&gt;
&lt;p&gt;The next day, also while preparing dinner, I received a call from a
different gentleman claiming to represent Sirius/XM, and wanting to
talk to me about my bill. This time, I'd had enough, and just hung up
on him.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;-1 Sirius&lt;/strong&gt;: Don't harass your customers!&lt;/p&gt;
&lt;p&gt;The next morning I went online to straighten everything out. Online,
it showed my service was still active, and that I indeed owed money
for my week and a half of service.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;-1 Sirius&lt;/strong&gt;: Customer service rep lied about canceling my service!&lt;/p&gt;
&lt;p&gt;On the website, it says you cannot cancel online, but need to call
between certain hours.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;-1 Sirius&lt;/strong&gt;: Making the customer jump through hoops to cancel&lt;/p&gt;
&lt;p&gt;I called customer service later in the day and spoke with a very
pleasant young woman named Sarah, who helped me through the
cancellation process. She asked me why I wanted to cancel, and I told
her about the customer service reps. She was very understanding, and
even took off the pro-rated $4.95 that I owed for my partial month of
service (that was only a third of what the other customer reps had
said I owed, btw), in hopes that I might join back up with Sirius/XM
in the future.&lt;/p&gt;
&lt;p&gt;At the end of the conversation, I honestly considered it. After all,
there was some good programming on Sirius, but I needed a few days to
think about it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;-1 Sirius&lt;/strong&gt;: Lying about how much the customer owes&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;+1 Sirius&lt;/strong&gt;: Good customer service when you call to cancel&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;+1 Sirius&lt;/strong&gt;: Taking off the $5 from my bill&lt;/p&gt;
&lt;p&gt;I felt good about my Sirius XM experience until just a few hours later
when yet another hard-to-hear call from yet another foreign person
about my service. This time, after going back and forth about not
being able to hear the person on the other end of the line, I finally
understood that she was calling me to inform me that my service was
canceled!&lt;/p&gt;
&lt;p&gt;Absolute madness.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;-1 Sirius&lt;/strong&gt;: Harassing your customers after they leave&lt;/p&gt;
&lt;p&gt;That brings our tally to -4 against Sirius/XM, and a great lesson in
how not to treat your customers.&lt;/p&gt;</content></entry><entry><title>You don't need to worry about GPS</title><link href="https://blog.emacsen.net/blog/2014/01/07/you-dont-need-to-worry-about-gps/" rel="alternate"></link><published>2014-01-07T11:03:21-05:00</published><updated>2014-01-07T11:03:21-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-01-07:/blog/2014/01/07/you-dont-need-to-worry-about-gps/</id><summary type="html">&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Gps"&gt;GPS&lt;/a&gt; is virtually synonymous
with navigation, but GPS exists at the whim of the US government, so
shouldn't I be concerned? The answer is that I am somewhat concerned,
but that I also do my part in trying to reduce our dependence on that
system.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;I'll venture to bet that …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Gps"&gt;GPS&lt;/a&gt; is virtually synonymous
with navigation, but GPS exists at the whim of the US government, so
shouldn't I be concerned? The answer is that I am somewhat concerned,
but that I also do my part in trying to reduce our dependence on that
system.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;I'll venture to bet that everyone reading this knows what GPS is, but
I suspect fewer people realize that GPS is entirely owned and
controlled by the US Department of Defense. In other words, the
millions of GPS enabled devices work because the US government allows
them to work, and if the US decided to shut the system down, even
temporarily, it could mean disaster. Am I worried? Not really.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; Disabling GPS Would be a Financial Disaster &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The GPS system is used worldwide, in everything from airplanes to cell
phones. If that system was degraded sufficiently, or shut down even
temporarily, it would cause a global financial disaster.&lt;/p&gt;
&lt;p&gt;Even if the US were to only select certain satellites and to degrade
the signal over certain regions, there would likely be unforeseen
consequences which would eventually effect the US financially.&lt;/p&gt;
&lt;p&gt;In addition to any immediate consequences, there would also be long
term issues raised around US reliance, which is a topic of increasing
concern internationally, especially after recent NSA revelations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; GPS is Not the Only Game in Town&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Even if the US were to shut down its system, the US's GPS system is
not the only satellite navigation system. Russia's GLONASS system,
China's Beidou system, and Europe's upcoming Galileo system are all
offering services which are similar in functionality and quality to
GPS, and with &lt;a href="http://www.engadget.com/2008/05/28/nemerix-scores-patent-for-single-chip-gps-glonass-galileo-rece/"&gt;all in one&lt;/a&gt;
chips coming out, there will be even less incentive to degrade any one
system's service.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; Ground Based Location Systems Exist &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In addition to satellite navigation systems, we can, and often do use
ground based navigation systems. Airplanes use a variety of land-based
augmentation systems such as
&lt;a href="http://en.wikipedia.org/wiki/Wide_Area_Augmentation_System"&gt;WAAS&lt;/a&gt; and
cell phones can determine their location by use of &lt;a href="http://wrongfulconvictionsblog.org/2012/06/01/cell-tower-triangulation-how-it-works/"&gt;cell tower triangulation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In addition to these methods, by looking at other signals, such as
&lt;a href="http://www.zdnet.com/blog/networking/how-google-and-everyone-else-gets-wi-fi-location-data/1664"&gt;Wifi access points&lt;/a&gt;,
one can lookup their location. Both Google and Apple use a
combination of cell tower data and wifi access points in augmenting
their GPS systems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; The Mozilla Location Service &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There have been a number of cell and wifi collection services. All of
them have so far been either technically lacking or proprietary in
nature. That's hopefully changing with the &lt;a href="https://wiki.mozilla.org/CloudServices/Location"&gt;Mozilla Location
Service&lt;/a&gt;, a new
Mozilla project to provide an alternative to the popular proprietary
services, including source code to both the server and client and,
&lt;a href="https://wiki.mozilla.org/CloudServices/Location/Privacy"&gt;once the privacy issues are sorted
out&lt;/a&gt;, a
downloadable database of locations.&lt;/p&gt;
&lt;p&gt;My personal contribution to the project is that I run their data
collection client,
&lt;a href="https://github.com/mozilla/MozStumbler/releases"&gt;MozStumber&lt;/a&gt; on my
Android phone, and I encourage others to do the same.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; A Free GPS Service?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Would it be better if we had our own navigation system owned by the
community, used as a common resource in the same way that Free/Open
Source software, and the OpenStreetMap project serve the community. Of
course it would, but do to that, we'd need millions of dollars in
development, construction, launch and maintenance of the satellites
needed for the effort. Even with advanced in amateur rocketry and
&lt;a href="http://www.kurzweilai.net/how-to-launch-your-own-homemade-satellite"&gt;satellites&lt;/a&gt;,
I don't think that this project will be feasible in the near future,
but it's also not necessary with so many existing alternatives.&lt;/p&gt;
&lt;p&gt;So don't worry about knowing where you are, you're covered.&lt;/p&gt;</content></entry><entry><title>The World Cares About OpenStreetMap</title><link href="https://blog.emacsen.net/blog/2014/01/05/the-world-cares-about-openstreetmap/" rel="alternate"></link><published>2014-01-05T23:26:45-05:00</published><updated>2014-01-05T23:26:45-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-01-05:/blog/2014/01/05/the-world-cares-about-openstreetmap/</id><summary type="html">&lt;p&gt;[&lt;strong&gt;UPDATE&lt;/strong&gt;] I will stop updating this, but after four translations,
syndication by The Guardian, and a video interview on Slashdot... I'm
speechless.&lt;/p&gt;
&lt;p&gt;Wow, what a response! My &lt;a href="http://blog.emacsen.net/blog/2014/01/04/why-the-world-needs-openstreetmap/"&gt;last post&lt;/a&gt;, received over 120,000 unique
visitors, over &lt;a href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fblog.emacsen.net%2Fblog%2F2014%2F01%2F04%2Fwhy-the-world-needs-openstreetmap%2F&amp;amp;text=Why%20the%20world%20needs%20OpenStreetMap%20-%20emacsen.net&amp;amp;tw_p=tweetbutton&amp;amp;url=http%3A%2F%2Fblog.emacsen.net%2Fblog%2F2014%2F01%2F04%2Fwhy-the-world-needs-openstreetmap%2F"&gt;500 tweets&lt;/a&gt;,
was #1 on &lt;a href="https://news.ycombinator.com/item?id=7015294"&gt;Hacker News&lt;/a&gt;,
was #2 on
&lt;a href="http://www.reddit.com/r/technology/comments/1ugi39/why_the_world_needs_openstreetmap/"&gt;/r/technology&lt;/a&gt;
on Reddit …&lt;/p&gt;</summary><content type="html">&lt;p&gt;[&lt;strong&gt;UPDATE&lt;/strong&gt;] I will stop updating this, but after four translations,
syndication by The Guardian, and a video interview on Slashdot... I'm
speechless.&lt;/p&gt;
&lt;p&gt;Wow, what a response! My &lt;a href="http://blog.emacsen.net/blog/2014/01/04/why-the-world-needs-openstreetmap/"&gt;last post&lt;/a&gt;, received over 120,000 unique
visitors, over &lt;a href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fblog.emacsen.net%2Fblog%2F2014%2F01%2F04%2Fwhy-the-world-needs-openstreetmap%2F&amp;amp;text=Why%20the%20world%20needs%20OpenStreetMap%20-%20emacsen.net&amp;amp;tw_p=tweetbutton&amp;amp;url=http%3A%2F%2Fblog.emacsen.net%2Fblog%2F2014%2F01%2F04%2Fwhy-the-world-needs-openstreetmap%2F"&gt;500 tweets&lt;/a&gt;,
was #1 on &lt;a href="https://news.ycombinator.com/item?id=7015294"&gt;Hacker News&lt;/a&gt;,
was #2 on
&lt;a href="http://www.reddit.com/r/technology/comments/1ugi39/why_the_world_needs_openstreetmap/"&gt;/r/technology&lt;/a&gt;
on Reddit, and a &lt;a href="https://duck.co/forum/thread/4988/link-why-the-world-needs-openstreetmap"&gt;mention by the CEO of
DuckDuckGo&lt;/a&gt;,
and more.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;We also saw the number of new user accounts per day triple from ~33
accounts per day to just over 120 accounts per day, which doesn't
include the buildup and the cool-down, which also exceeded our signup
rate.&lt;/p&gt;
&lt;p&gt;I also received several nice pieces of email from folks who read the
post and either had followup questions, or just wanted to thank me for
writing it.&lt;/p&gt;
&lt;p&gt;I'm writing this post to express my gratitude to everyone.&lt;/p&gt;
&lt;p&gt;With any group, it's easy to lose perspective, or get lost in an echo
chamber of your peers. I wasn't sure who would care to read about a
project they likely never used, but based on the response, I think the
answer is that there are a lot of people. That's really validating and
helps me get through the tougher times in the project.&lt;/p&gt;
&lt;p&gt;For new folks, I won't try to re-hash the many new user introduction
guides out on the web, but in future posts, I'll try to talk more
about the internals of the project- how things work behind the
scenes. For regular editors, I'll be talking about some exciting work
that I'm doing to make our project better.&lt;/p&gt;
&lt;p&gt;Stay tuned because it's going to be a really fun ride.&lt;/p&gt;
&lt;p&gt;Thanks again for the support!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; 144k unique views, &amp;gt;700 tweets, &amp;gt;100 Google+ posts, and nearly 350 Facebook posts.&lt;/p&gt;
&lt;p&gt;Oh, and &lt;strong&gt;&lt;a href="http://gizmodo.com/why-the-world-needs-openstreetmap-1495412839"&gt;GIZMODO SYNDICATED IT!&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</content></entry><entry><title>Why the world needs OpenStreetMap</title><link href="https://blog.emacsen.net/blog/2014/01/04/why-the-world-needs-openstreetmap/" rel="alternate"></link><published>2014-01-04T20:46:25-05:00</published><updated>2014-01-04T20:46:25-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-01-04:/blog/2014/01/04/why-the-world-needs-openstreetmap/</id><summary type="html">&lt;p&gt;Every time I tell someone about OpenStreetMap, they inevitably ask
"Why not use Google Maps?". From a practical standpoint, it's a
reasonable question, but ultimately this is not just a matter of
practicality, but of what kind of society we want to live in. I
discussed this topic in a …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Every time I tell someone about OpenStreetMap, they inevitably ask
"Why not use Google Maps?". From a practical standpoint, it's a
reasonable question, but ultimately this is not just a matter of
practicality, but of what kind of society we want to live in. I
discussed this topic in a 2008 talk on OpenStreetMap I gave at the
first MappingDC meeting. Here are many of same concepts, but expanded.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;In the 1800s, people were struggling with time, not how much of it
they had, but what time it was. Clocks existed, but every town had its
own time, "Local time", which was synchronized by town clocks, or more
often than not, church bells. Railway time, then eventually Greenwich
Mean Time eventually supplanted all local time, and most people today
don't think about time as anything but universal. This was
accomplished in the US by adoption first of the railroads, and then by
universities and large businesses.&lt;/p&gt;
&lt;p&gt;The modern day time dilemma is geography, and everyone is looking to
be the definitive source. Google spends &lt;a href="http://www.asymco.com/2012/12/18/how-much-to-maps-cost-and-what-are-they-worth/"&gt;$1 billion annually&lt;/a&gt;
maintaining their maps, and that does not include the 1.5 billion
Google spent &lt;a href="http://techcrunch.com/2013/06/11/its-official-google-buys-waze-giving-a-social-data-boost-to-its-location-and-mapping-business/"&gt;buying Waze&lt;/a&gt;. Google
is far from the only company trying to own everywhere, as Nokia
purchased Navtek and TomTom and
Tele Atlas try to merge. All of these companies want to become the
definitive source of what's on the ground.&lt;/p&gt;
&lt;p&gt;That's because what's on the ground has become big business. With
GPSes in every car, and a smartphone in every pocket, the market for
telling you where you are and where to go has become fierce.&lt;/p&gt;
&lt;p&gt;With all these companies, why do we need a project like OpenStreetMap?
The answer is simply that as a society, no one company should have a
monopoly on place, just as no one company had a monopoly on time in
the 1800s. Place is a shared resource, and when you give all that
power to a single entity, you are giving them the power not only to
tell you about your location, but to shape it. In summary, there are
three concerns- who decides what gets shown on the map, who decides
where you are and where you should go, and personal privacy.&lt;/p&gt;
&lt;p&gt;Who decides what gets displayed on a Google Map? The answer is, of
course, that Google does.  I heard this concern in a meeting with a
local government in 2009- they were concerned about using Google Maps
on their website because Google makes choices about which businesses
to display. They were right to be concerned about this issue since a
government needs to remain impartial and by outsourcing their maps,
they hand the control over to a third party.&lt;/p&gt;
&lt;p&gt;It seems inevitable that Google will monetize geographic searches,
with either premium results, or priority ordering, if they haven't
done so already (ie is it a coincidence than when I search for
"breakfast" near my home, the first result is "SUBWAY® Restaurants").&lt;/p&gt;
&lt;p&gt;Of course Google is not the only map provider, they're just one
example. The point is that when you use any map provider, you are
handing them the controls- letting them determine what features get
emphasized, or what features may not be displayed at all.&lt;/p&gt;
&lt;p&gt;The second concern is about location. Who defines where a neighborhood
is, or whether or not you should go.  This issue was brought up by the
&lt;a href="https://www.aclu.org/blog/racial-justice-criminal-law-reform-technology-and-liberty/your-turn-turn-navigation-application"&gt;ACLU&lt;/a&gt;,
where a map provider was providing routing (driving/biking/walking
instructions) and used what they determined to be safe or dangerous
neighborhoods as part of their algorithm. This begs the question of
who determines what makes a neighborhood safe or not, or whether safe
is merely a codeword for something more sinister.&lt;/p&gt;
&lt;p&gt;Right now, Flickr collects neighborhood information based on
photographs which they expose &lt;a href="http://code.flickr.net/2008/10/30/the-shape-of-alpha/"&gt;through an API&lt;/a&gt;. They use this information to suggest tags for your photograph, but it would be
possible to use neighborhood boundaries in a more subtle way in order
to effect anything from traffic patterns to real estate prices,
because when a map provider becomes large enough, they become
the source of "truth".&lt;/p&gt;
&lt;p&gt;Lastly, these map providers have an incentive to collect information 
about you in ways that you may not agree with. Both Google and Apple 
collect your location information when you use their services. They can 
use this information to improve their map accuracy, but Google has 
already announced that is going to use this information to &lt;a href="http://digiday.com/platforms/google-tracking/"&gt;track the correlation between searches and where you go&lt;/a&gt;. With &lt;a href="http://news.cnet.com/8301-1035_3-57510994-94/google-500-million-android-devices-activated/"&gt;500 million Android phones&lt;/a&gt;, this is an enormous amount of information collected on the individual level about people's habits whether they're taking a casual stroll, commuting to work, going to their doctor, or maybe attending a protest. Certainly we can't ignore the societal implication of so much data in the hands of a single entity, no matter how &lt;a href="http://en.wikipedia.org/wiki/Don%27t_be_evil"&gt;benevolent they claim to be&lt;/a&gt;. Companies like Foursquare use &lt;a href="http://engineering.foursquare.com/2014/01/03/the-mathematics-of-gamification/"&gt;gamification&lt;/a&gt; to overlay what is essentially a large scale data collection process, and even Google has gotten into the game of gamification with &lt;a href="https://en.wikipedia.org/wiki/Ingress_%28game%29"&gt;Ingress&lt;/a&gt;, a game which overlays an artificial world onto this one and encourages users to collect routing data and photo mapping as part of effort to either fight off, or encourage, an alien invasion.&lt;/p&gt;
&lt;p&gt;Now that we have identified the problems, we can examine how 
OpenStreetMap solves each of them.&lt;/p&gt;
&lt;p&gt;In terms of map content, OpenStreetMap is both neutral and transparent. 
OpenStreetMap is a wiki-like map that anyone in the world can edit. If a 
store is missing from the map, it can be added in, by a store owner or 
even a customer. In terms of display (rendering), each person or company 
who creates a map is free to render it how they like, but the main map 
on &lt;a href="http://www.openstreetmap.org"&gt;OpenStreetMap.org&lt;/a&gt; uses FLOSS 
(Free/Libre Open Source Software) rendering software and a liberally 
licensed stylesheet which anyone can build on. In other words, someone 
who cares can always create their own maps based on the same data.&lt;/p&gt;
&lt;p&gt;Similarly, while the most popular routers for OpenStreetMap are FLOSS, 
even if a company chooses another software stack, a user is always free 
to use their own routing software, and it would be easy to compare 
routing results based on the same data to find anomalies.&lt;/p&gt;
&lt;p&gt;And lastly, with OpenStreetMap data, a user is free to download some, or 
all of the map offline. This means that it's possible to use 
OpenStreetMap data to navigate without giving your location away to 
anyone at all.&lt;/p&gt;
&lt;p&gt;OpenStreetMap respects communities and respects people. If you're not
already contributing to OSM, consider helping out. If you're already a
contributor- Thank You.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; Wow, what a &lt;a href="http://blog.emacsen.net/blog/2014/01/05/the-world-cares-about-openstreetmap/"&gt;response!&lt;/a&gt;&lt;/p&gt;</content></entry><entry><title>Learning Math Earlier With Computers</title><link href="https://blog.emacsen.net/blog/2014/01/04/learning-math-earlier-with-computers/" rel="alternate"></link><published>2014-01-04T00:15:24-05:00</published><updated>2014-01-04T00:15:24-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-01-04:/blog/2014/01/04/learning-math-earlier-with-computers/</id><summary type="html">&lt;p&gt;Writing the previous post got me thinking about the nature of
how programmers use programs and how it relates to teaching in
general.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;A couple of years ago, I wrote a little prototype address book that
accounted for my misspellings. The idea was that if someone had a
name like …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Writing the previous post got me thinking about the nature of
how programmers use programs and how it relates to teaching in
general.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;A couple of years ago, I wrote a little prototype address book that
accounted for my misspellings. The idea was that if someone had a
name like Karalyne, that even if I spelled it "Caroline", it would
find it.&lt;/p&gt;
&lt;p&gt;To do so, I used the Soundex algorithm in Python:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;fuzzy&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;soundex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fuzzy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Soundex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;soundex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Caroline&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="s1"&gt;&amp;#39;C6450&amp;#39;&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;soundex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Karalyn&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="s1"&gt;&amp;#39;K6450&amp;#39;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then I used the Levenshtein algorithm to determine the best match, and
as the user typed, the matches would become better.&lt;/p&gt;
&lt;p&gt;When I wrote the program, and even today, I have no understanding of
exactly how Soundex works. I know that it transforms the string into
a set of values which correspond to how it sounds, but I don't need
to understand its implementation to use it.&lt;/p&gt;
&lt;p&gt;That's the way most libraries work- one doesn't need to understand
them in order to use them.&lt;/p&gt;
&lt;p&gt;In &lt;a href="http://www.ted.com/talks/conrad_wolfram_teaching_kids_real_math_with_computers.html"&gt;this TED talk&lt;/a&gt;,
Conrad Wolfram argues that this is the same way that we should be
teaching math to children, with an emphasis on usage first, and
understanding afterwards.&lt;/p&gt;
&lt;p&gt;His examples include geometry, but the same arguments could be made
about statistical analysis.&lt;/p&gt;
&lt;p&gt;Most people working with a dataset will need to know what questions
to ask- determining the type of data and knowing what questions to
ask is the most important thing. Figuring out whether or not the data
fits a certain model will help you determine the type of analysis
that needs to be done next.&lt;/p&gt;
&lt;p&gt;If we taught statistics this way, with an emphasis on the analysis,
rather than the process, we could teach statistics not in college, as
&lt;a href="http://www.ted.com/talks/arthur_benjamin_s_formula_for_changing_math_education.html"&gt;Arthur Benjamin&lt;/a&gt;
suggests, but as earlier, even as early as Algebra. The concepts in a
subject like statistics are concrete, they're tangible, and it would
be possible for students to be as comfortable using them even before
they understand them, just as I'm comfortable using Soundex, even when
I have only the most rudimentary understanding of how it works.&lt;/p&gt;</content></entry><entry><title>Python for Adults</title><link href="https://blog.emacsen.net/blog/2014/01/03/python-for-adults/" rel="alternate"></link><published>2014-01-03T11:42:00-05:00</published><updated>2014-01-03T11:42:00-05:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2014-01-03:/blog/2014/01/03/python-for-adults/</id><summary type="html">&lt;p&gt;My girlfriend has always wanted to program. She even took C++ in high 
school and college, but never quite "Got it", leaving her with a bad 
taste for computers and programming. Still, when I lent her my copy of 
&lt;a href="http://www.ccs.neu.edu/home/matthias/BTLS/"&gt;The Little Schemer&lt;/a&gt;, she 
took to it pretty easily, so I …&lt;/p&gt;</summary><content type="html">&lt;p&gt;My girlfriend has always wanted to program. She even took C++ in high 
school and college, but never quite "Got it", leaving her with a bad 
taste for computers and programming. Still, when I lent her my copy of 
&lt;a href="http://www.ccs.neu.edu/home/matthias/BTLS/"&gt;The Little Schemer&lt;/a&gt;, she 
took to it pretty easily, so I knew she had the potential to be able to 
program, despite her past difficulties.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;So then the question becomes what language to teach her. While Scheme 
would be a nice choice in theory, despite more than three decades as a 
teaching language, it's still not popular in the mainstream. While this 
wouldn't be important in a classroom setting, adults have a different 
set of needs for programming. Notably, they need to be able to apply 
their skills quickly to something in their life.&lt;/p&gt;
&lt;p&gt;That's why Python fits the bill so well. First off, its simple. It's 
syntax is absolutely minimalist, as are its features. I call Python by 
"80% Language", in that 80% of all tasks I need to do, I can do with 
Python. It doesn't have &lt;a href="http://www.robertsosinski.com/2008/12/21/understanding-ruby-blocks-procs-and-lambdas/"&gt;Ruby Blocks&lt;/a&gt;, 
or &lt;a href="http://www.python.org/dev/peps/pep-0245/"&gt;Interfaces&lt;/a&gt;, or &lt;a href="http://stackoverflow.com/questions/267862/what-makes-lisp-macros-so-special"&gt;Lisp Macros&lt;/a&gt;, Python is arguably the best general purpose language out there.&lt;/p&gt;
&lt;p&gt;The key to Python's success is three part. The first of those is design. 
Python's roots as a teaching or prototyping language meant that there is 
an emphasis on simplicity and elegance. It's very light on syntax, it 
supports Object Oriented programming, but does not demand it, and 
operations that are performed often, like array indexing, hash table 
lookups and mapping have special syntax to make them more convenient.&lt;/p&gt;
&lt;p&gt;Python also stays firmly in the general purpose language camp. 
&lt;a href="http://www.r-project.org/"&gt;R&lt;/a&gt; has become increasingly popular for 
statistics work in the last five years, and while R does have 
&lt;a href="http://cran.r-project.org/doc/manuals/R-exts.html"&gt;extensions&lt;/a&gt;, it is 
designed for data analysis. Perl started off its life as a text 
processing and scripting language, and while it's grown out of that 
role, it still has those concepts embeddeded within it. Python changes 
slowly over time and borrows from other languages while staying true to 
itself. For example, Python recently adopted &lt;a href="http://www.python.org/dev/peps/pep-3156/"&gt;Asyncronous 
IO&lt;/a&gt; in the core, but does not 
require that any program use it.&lt;/p&gt;
&lt;p&gt;The second strength Python has are its libraries. While Python has fewer 
libraries than Perl, it offers more simple, practical interfaces to more 
systems. For example, I mentioned R earlier, and Python programmers can 
interface directly with R through &lt;a href="http://rpy.sourceforge.net/"&gt;RPy&lt;/a&gt;, 
while still being able to use simple web accessing frameworks like 
&lt;a href="http://docs.python-requests.org/en/latest/"&gt;Requests&lt;/a&gt;, and powerful 
phonetic algorithms such as those found in 
&lt;a href="https://pypi.python.org/pypi/Fuzzy"&gt;Fuzzy&lt;/a&gt;. In fact, whole Python 
distributions have been created around nothing but packaging up the best 
libraries for a particular task, such as &lt;a href="http://www.scipy.org/"&gt;SciPy&lt;/a&gt;, 
and &lt;a href="http://biopython.org"&gt;Biopython&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The third, and perhaps most important strength of Python is its user 
community. I'm sure this will be the most controversial part of this 
post, but I've found the Python community has bar-none the most 
supportive users. This is not by accident, but part of Python's legacy 
and current commitment to inclusion. Python came from a teaching 
language background, and documentation was, and continues to be part of 
that legacy. Python is used as a teaching language in &lt;a href="http://www.python.org/workshops/2000-01/proceedings/papers/elkner/pyYHS.html"&gt;High Schools&lt;/a&gt; 
as well as 
&lt;a href="http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-189-a-gentle-introduction-to-programming-using-python-january-iap-2011/"&gt;MIT&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In addition, the Python Foundation focuses a lot of attention and energy 
into community diversity through its &lt;a href="http://www.python.org/community/diversity/"&gt;Diversity Statement&lt;/a&gt;, as well as 
commitment to bring women into the community, both through their own 
local communities (&lt;a href="http://www.pyladies.com/"&gt;PyLadies&lt;/a&gt;) but also 
focusing on bringing that diversity into mainline events such as PyCon. 
The net effect is that Python is not only welcoming to women, but has a 
general welcoming atmosphere to people of virtually any background.&lt;/p&gt;
&lt;p&gt;If someone is considering Python, especially if they have a scientific 
background, I suggest watching &lt;a href="http://www.youtube.com/watch?v=F4rFuIb1Ie4"&gt;Science and Python&lt;/a&gt;, and jumping in with 
&lt;a href="http://learnpythonthehardway.org/"&gt;Learn Python the Hard Way&lt;/a&gt; followed 
with &lt;a href="http://newcoder.io/"&gt;New Coder&lt;/a&gt;, which is described in depth at 
&lt;a href="http://pyvideo.org/video/1782/sink-or-swim-5-life-jackets-to-throw-to-new-code"&gt;this talk&lt;/a&gt; 
by Lynn Root.&lt;/p&gt;</content></entry><entry><title>Compressor Repair</title><link href="https://blog.emacsen.net/blog/2012/06/09/compressor-repair/" rel="alternate"></link><published>2012-06-09T13:24:00-04:00</published><updated>2012-06-09T13:24:00-04:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2012-06-09:/blog/2012/06/09/compressor-repair/</id><summary type="html">&lt;p&gt;My friend Chad of the band &lt;a href="http://emperorx.net"&gt;Emperor X&lt;/a&gt; has put out a video
for their new song "Compressor Repair".&lt;/p&gt;
&lt;p&gt;I'm a huge fan, so indulge me and check it out.&lt;/p&gt;
&lt;iframe width="560" height="315" src="http://www.youtube.com/embed/nOt-CWLTZZ8" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;</summary><content type="html">&lt;p&gt;My friend Chad of the band &lt;a href="http://emperorx.net"&gt;Emperor X&lt;/a&gt; has put out a video
for their new song "Compressor Repair".&lt;/p&gt;
&lt;p&gt;I'm a huge fan, so indulge me and check it out.&lt;/p&gt;
&lt;iframe width="560" height="315" src="http://www.youtube.com/embed/nOt-CWLTZZ8" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;</content></entry><entry><title>Reintroductions</title><link href="https://blog.emacsen.net/blog/2012/06/09/reintroductions/" rel="alternate"></link><published>2012-06-09T08:30:00-04:00</published><updated>2012-06-09T08:30:00-04:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2012-06-09:/blog/2012/06/09/reintroductions/</id><summary type="html">&lt;p&gt;Wow, I must have really touched on something in my last post
(&lt;a href="http://blog.emacsen.net/blog/2012/06/07/observations-from-a-python-workshop/"&gt;Observations at a Python workshop&lt;/a&gt;), it's received over
20k unique visitors in the last twenty four hours, which is a lot from
a blog which until yesterday, didn't exist.&lt;/p&gt;
&lt;p&gt;For those people who don't know me, I thought …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Wow, I must have really touched on something in my last post
(&lt;a href="http://blog.emacsen.net/blog/2012/06/07/observations-from-a-python-workshop/"&gt;Observations at a Python workshop&lt;/a&gt;), it's received over
20k unique visitors in the last twenty four hours, which is a lot from
a blog which until yesterday, didn't exist.&lt;/p&gt;
&lt;p&gt;For those people who don't know me, I thought I'd give some
introductions.&lt;/p&gt;
&lt;p&gt;My name is Serge Wroclawski, I'm a long standing member of the Free
Software community. I spent 12 years of my life as a Unix system
administrator, mostly working for academic government institutions
such as NIH and NASA.&lt;/p&gt;
&lt;p&gt;I've quit my job to work on my passion, which is to help the various
communities involved in software, culture, education- basically to
make works available to anyone and everyone who wants it, without
restrictions.&lt;/p&gt;
&lt;p&gt;To that end, I'm in the process of founding a new non-profit dedicated
to Free Culture and making it easier for artists to add their work
into Free Culture. If anyone would be interested in helping in this
effort, please feel free to &lt;a href="http://blog.emacsen.net/contact"&gt;contact me&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I'm also moving to New York City later this summer and would love to
meet some new people there, especially those in either the arts or
technical community, so if you're in/around NYC drop me a line!&lt;/p&gt;
&lt;p&gt;Thanks again everyone for reading/subscribing. I hope to have lots of
posts in the days to come; my personal goal is one not less than every
two weeks.&lt;/p&gt;
&lt;p&gt;And if anyone is curious, my &lt;a href="http://emacsen.livejournal.com"&gt;old blog&lt;/a&gt; is still around for now,
though I am not updating it, and it's full of comment spam.&lt;/p&gt;</content></entry><entry><title>Observations from a Python Workshop</title><link href="https://blog.emacsen.net/blog/2012/06/07/observations-from-a-python-workshop/" rel="alternate"></link><published>2012-06-07T23:09:00-04:00</published><updated>2012-06-07T23:09:00-04:00</updated><author><name>Serge Wroclawski</name></author><id>tag:blog.emacsen.net,2012-06-07:/blog/2012/06/07/observations-from-a-python-workshop/</id><summary type="html">&lt;p&gt;I heard about a Python tutorial that was going on this weekend, and
with well over a decade of Python experience, I decided to volunteer
to help students.  I hadn't realized it was a women's workshop put on
by &lt;a href="http://pyladies.com"&gt;PyLadies&lt;/a&gt;, but I'm glad I went because I came out of …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I heard about a Python tutorial that was going on this weekend, and
with well over a decade of Python experience, I decided to volunteer
to help students.  I hadn't realized it was a women's workshop put on
by &lt;a href="http://pyladies.com"&gt;PyLadies&lt;/a&gt;, but I'm glad I went because I came out of
the event with a number of observations that extend out to the Free
Software community as a whole.&lt;/p&gt;
&lt;p&gt;It's no secret that our community isn't great at encouraging women
contributors. &lt;a href="http://www.networkworld.com/community/node/58218"&gt;Various surveys&lt;/a&gt; show that between 1.5
and 5% of Free Software contributors are women. That is low even
compared to the 12-25% of &lt;a href="http://www.quora.com/What-is-the-percentage-of-women-in-computer-science-generally"&gt;women in computer science&lt;/a&gt;. And
while we all cringe at incidents like the Golden Gate Ruby Conference
&lt;a href="http://www.ultrasaurus.com/sarahblog/2009/04/gender-and-sex-at-gogaruco/"&gt;fiasco&lt;/a&gt;, and the &lt;a href="http://thenextweb.com/us/2012/03/20/sqoot-loses-sponsors-following-misogynistic-description-of-their-api-jam-event/"&gt;Squoot Jam&lt;/a&gt;, these
incidents alone don't explain the lack of participation by women in
our community.&lt;/p&gt;
&lt;h2&gt;The Audience Is Out There&lt;/h2&gt;
&lt;p&gt;The class was well attended. Seventeen women and one man came to learn
how to program in Python. Considering that Python materials are
readily available in books, on the web and in videos, this heavy
attendance shows that there are people who want to learn and that they
will if they're presented with the opportunity.&lt;/p&gt;
&lt;h2&gt;Motivation&lt;/h2&gt;
&lt;p&gt;In one of the classic programming texts (I forget which one), the
author says that very few people who learn to program should be
programmers, but that he'd like to see more programming done by those
of other professions. The workshop would have made him proud, as every
student I talked to shared the sentiment with me that they hoped to
learn Python in order to do their job more effectively, by learning to
collect, sort or process data in new and more efficient ways.&lt;/p&gt;
&lt;h2&gt;The Students Care&lt;/h2&gt;
&lt;p&gt;During the first half of the class, the students were engaged, and
excited. They asked questions, and worked with the instructor, and
with each other, to help fill in the gaps. Sometimes they'd ask a
volunteer for help, but largely the questions I received were
grammatical rather than conceptual. &lt;/p&gt;
&lt;h2&gt;The Unsure Student&lt;/h2&gt;
&lt;p&gt;By and large the students seemed comfortable with the material and
engaged with the instructor, but there were exceptions.&lt;/p&gt;
&lt;p&gt;One of the students who sat next to me was a young woman who was far
ahead of the class. She was easily an hour ahead of the other students
in the progress she'd made with the final project when she asked me
for help.&lt;/p&gt;
&lt;p&gt;Looking at her screen, she'd made significant progress towards
finishing the project, but when she asked me a question she giggled
and told me she had no idea what the project was about, or what to do.&lt;/p&gt;
&lt;p&gt;Why?&lt;/p&gt;
&lt;p&gt;I still don't know the reason. &lt;a href="http://www.psychologytoday.com/blog/the-science-success/201101/the-trouble-bright-girls"&gt;Studies&lt;/a&gt; have shown that
especially bright women have this reaction to difficult material and
that women learning computer science do better in an
&lt;a href="http://www.singlesexschools.org/advantages-equity.htm"&gt;single sex&lt;/a&gt; classroom (though those studies have
&lt;a href="http://www.sciencemag.org/content/333/6050/1706.full"&gt;critics&lt;/a&gt;). But I can say that I personally found this
experience surprising, and I wondered afterwards why this extremely
competent woman in her 20s would react this way after clearly
mastering the material.&lt;/p&gt;
&lt;h2&gt;The Presence of a "Helpful" Jerk&lt;/h2&gt;
&lt;p&gt;I mentioned earlier that the first half of the class had a lot of
student engagement, with questions and joking.&lt;/p&gt;
&lt;p&gt;After lunch, a new volunteer joined the classroom, someone I'll call
Dave.&lt;/p&gt;
&lt;p&gt;Dave was really excited by the class, and, like me and the other
volunteers, had a lot of experience with Python.&lt;/p&gt;
&lt;p&gt;Dave expressed his enthusiasm for the material by asking a lot of very
technical questions to the instructor. Largely, these questions seemed
designed to show off his own knowledge, or to challenge the
instructor. In other words, Dave was the &lt;a href="http://kev.inburke.com/kevin/how-not-to-ask-questions-at-conference"&gt;jerk at the conference&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And Dave's behavior had a noticable effect on the workshop. Students
tuned out, became distracted, asked less questions, and had a lot more
difficulty following the material.&lt;/p&gt;
&lt;p&gt;While the students tuned out, I felt myself getting angry. I saw
Dave's behavior as a challenge, a call to action. And it was at that
moment that the gender difference became most apparent to me.&lt;/p&gt;
&lt;p&gt;To me, and I suspect most men, we'd see Dave's behavior as a call to
arms. Dave was raising the stakes and even though his behavior was
clearly rude, it also demonstrated that he had a mastery over the
material.&lt;/p&gt;
&lt;p&gt;But to this classroom, Dave's behavior not only ground the timing of
the class down to a halt, it also seemed to have an effect on the
students, who had until then been very involved in the workshop.&lt;/p&gt;
&lt;h2&gt;Lessons Learned&lt;/h2&gt;
&lt;p&gt;I'd never really believed in single sex education, and I'd really
never believed that the gender difference in computer science
education was due to lack of interest. Just as I've never heard an
outcry about how few &lt;a href="http://www.menteach.org/node/34"&gt;male teachers&lt;/a&gt; exist, I never
understood the outcry about the lack of women programmers or
sys-admins.&lt;/p&gt;
&lt;p&gt;But my experience last weekend changed my view. One of the students
from the workshop came to the &lt;a href="http://meetup.dcpython.org"&gt;DC Python&lt;/a&gt; meetup, and I saw
that women only groups are not creating a more insular community of
women, but rather offering these women a more comfortable entrance
into our general community, and so I say more &lt;a href="http://linuxchix.org"&gt;LinuxChix&lt;/a&gt;,
more &lt;a href="http://pyladies.com"&gt;PyLadies&lt;/a&gt;, and more &lt;a href="http://ladieslearningcode.com"&gt;Ladies Learning Code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The jerk factor also reminded me of why we in the Free Software
community need to be taking issues of civility seriously, and not
letting the idea of "free speech" get in the way of maintaining a safe
place for discussion. I've seen groups fail in both ways, by allowing
jerks to run the roost, and with draconian and arbitrary moderation. I
can't recommend &lt;a href="http://www.artofcommunityonline.org"&gt;Art of Community&lt;/a&gt; enough.&lt;/p&gt;</content></entry></feed>