-3

I've been wondering about this for a while, and I can't seem to figure it out. I keep going between this site, SO, and Mathematics; I can't stick to one of these.

18

The easiest way to see what order sites were created in is to go to stackexchange.com > All Sites > Sort by "Oldest" (https://stackexchange.com/sites?view=list#oldest):

As you can see, Stack Overflow is the oldest, Meta Stack Exchange (previously known as Meta Stack Overflow) is 3rd oldest, and Mathematics (not shown in screenshot) is 14th oldest.

5

In 2008, Jeff Atwood and Joel Spolsky created Stack Overflow, a question-and-answer Web site for computer programming questions, which they described as an alternative to the programmer forum Experts-Exchange.

In 2009, they started additional sites based on the Stack Overflow model: Server Fault for questions related to system administration and Super User for questions from computer "power users"...

Source: Wikipedia

3

To get the creation dates of the sites you can call the /sites API. The following stacksnippet leverages that API to show you the result.

function createImageCell(site) {
   var cell = document.createElement('td'),
       img = document.createElement('img');
   img.src = site.high_resolution_icon_url;
   cell.appendChild(img);
   return cell;
}

function createSiteCell(site) {
   var cell = document.createElement('td'),
       a = document.createElement('a');
   a.innerHTML = site.name;
   a.href = site.site_url;
   cell.appendChild(a);
   return cell;
}
// a site has several dates, depending on its state
// this function returns one of those dates, given its state
function getSiteDateValue(site) {
   return { 
     'normal': site.launch_date,
     'open_beta': site.open_beta_date,
     'closed_beta': site.closed_beta_date || site.open_beta_date
   }[site.site_state];
}

function createDateCell(site) {

   function leftPad(num) {
      var tot = '0' + num.toString();
      return tot.substr(-2);
   }
   var cell = document.createElement('td'),
       dtm;
   dtm = new Date(getSiteDateValue(site) * 1000);    
   cell.innerHTML = dtm.getFullYear() 
     + "‑" 
     + leftPad(dtm.getMonth() + 1)
     + '‑' 
     + leftPad(dtm.getDate());
   return cell;
}

function addSiteRow(target, site) {
  var siterow = document.createElement('tr');
  siterow.appendChild(createImageCell(site));
  siterow.appendChild(createSiteCell(site));
  siterow.appendChild(createDateCell(site));
  target.appendChild(siterow);
}

// adds each site to the result table
function ResultBuilder() {
  var result = document.getElementById('result');
  return (site) => addSiteRow(result, site);
}

var xhr = new XMLHttpRequest();

xhr.open('GET','https://api.stackexchange.com/2.2/sites?pagesize=500&filter=!2--Yi0jSB3dNY9ZXSAr2a');

xhr.onreadystatechange = function() {
  if (xhr.readyState === XMLHttpRequest.DONE) {
    var sites = JSON.parse(xhr.responseText),
        resultBuilder = new ResultBuilder();
        
    sites
      .items
      .filter( site => site.site_type === 'main_site')
      .sort( (l, r) => getSiteDateValue(l)- getSiteDateValue(r))
      .forEach( resultBuilder );
  }  
};

xhr.send();
ul { 
  padding:0px;
  margin:0px;
    }
td {
  border-top: solid blue 1px;
  }
  
img {width:32px; height:32px;}
<table>
  <thead>
    <tr>
      <th>&nbsp;</th>
      <th>Site</th>
      <th>Launch date</th>
    </tr>
  </thead>
  <tbody id="result">
  </tbody>
</table>

  • Not sure what's going on with the sorting: i.stack.imgur.com/yqueH.png – Cai Feb 12 '18 at 18:19
  • @Cai MathOverflow was created in 2009 and joined the SE network in 2013. See this meta post. – Laurel Feb 12 '18 at 18:43
  • @Laurel it's not only MathOverflow, lots of sites are out of order. See e.g: i.stack.imgur.com/n6ekZ.png and i.stack.imgur.com/RvgaX.png – Cai Feb 12 '18 at 18:45
  • @Cai I think I fixed it, I was sorting the array before it was filtered. Thanks for reporting and sorry for the hassle. – rene Feb 12 '18 at 20:28
  • @Laurel yeah, also the CS50 site in this list is kind weird. I'm sure there are other sites that have strange dates or a strange state causing all kind of issues. – rene Feb 12 '18 at 20:30
  • @rene no worries, looks about right now – Cai Feb 12 '18 at 21:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .