December 26, 2019

How Big is This Site I’m Refactoring?


Last week I began the process of refactoring historyofcuba.com. The need for this had been there for years, but the will to do it was nowhere to be found.
Almost ten years ago (2010) I performed a statistical count of all items included on the site. The count was adjusted and finalized on 2014, and it’s unlikely that the numbers have changed since then.
This is what the count revealed;
historyofcuba.com consists of 1,021 total files distributed among 10 folders and 34 sub-folders. There are 571 graphic files and 450 text files (HTML, CSS, JavaScript).
The history is divided into the various periods, but the content itself is presented as timetables, timelines, articles, menus, image galleries, and book excerpts.
Initially there was only one style sheet for the whole site, but it grew cumbersome and over time I separated it into 4 different files (which will be described later).
According to those measurements, the site features a total word count of 207,097 words. This is actual “site content” and excludes any HTML, JavaScript, CSS or anything not seen by the site user.
The total word count can be divided as follows:
·        Timetables – 50,014
·        Timelines – 29,426
·        Articles -    59,731
·        Book Excerpts – 40,857
·        Misc Hist – 27,051

Counting Methods
A lot of care went into making sure that items were not double counted, as they might belong to different “types” of content. For example, the Martí section includes an article, various sidebars and a timeline. For the word count, the Marti article and corresponding sidebars are counted under “Articles” and the Martí Timeline is counted under “Timelines.” This convention is followed throughout the count.
The Articles word-count of 59,731 includes the history items not counted under Timetables or Timelines. These items include articles and sidebars, notes and abstracts.  
The site also features more than 40 book excerpts from 29 books. These books include: The Man Who Invented Fidel, by Anthony DePalma; Cuba: Between Reform and Revolution, by Louis A. Pérez, Jr.; Versos SensillosA New Translation by Anne Fountain; Family Portrait with Fidel and The Twelve, by Carlos Franqui; Little Man: Meyer Lansky and the Gangster Life, by Robert Lacy; and Kennedy by Theodore Sorensen.  
Another significant “chunk” of content is described as MISC, with 27,000 words. This includes historical documents that have played an important part in the country’s evolution, such as the Teller and Platt Amendments; the letter by ex-President Estrada Palma discussing his resignation from office in 1906; various treaties between the U.S. and Cuba; the proclamation issued by U.S. Secretary of War William H. Taft in September 1906 when he assumed leadership of the Cuban government; Martí’s thoughts on Antonio Maceo, and more.

Largest Content Segment
In terms of word-count, the site’s largest segment is the Timetables, with 50,014 words. Timetable coverage begins shortly before Spanish arrival in 1492 and continues all the way to 2005. Along the way, users can jump to articles, sections and galleries to learn more about the events depicted.
The 2nd largest type of content is the Timelines with 29,426 words. There are seven distinct timelines, the largest of which is the Antonio Maceo Timeline with 14,391 words. In this unique timeline, users can follow Maceo’s life from birth in 1845 until his death in battle during Cuba’s War of Independence in 1896. Other timelines included: the Martí Timeline, Cuban Sports Timeline, Embargo Timeline, Missile Crisis Timeline, Race War of 1912 Timeline and the Che Guevara Timeline.
The Timetables provide a linear journey through five centuries of Cuban history. Here you'll encounter wars for independence, slave revolts and blind-with-power Captains-Generals, conquering Spanish soldiers thinking they’re on a mission from God, and many brave Cubans who contributed to the island’s long and complex past.
The timetables are spread out over 12 HTML files running 50,000 words. (The timetables stop at 2005)
Basic Timetable Organization
Early History: 1492 - 1775
Struggle for Independence: 1776 - 1928
Before the Revolution: 1933 - 1958
After the Revolution: 1959 - 1979
The Eighties and Beyond: 1980 – 2005


 As you might guess, the refactoring of this site may turn out to be more complicated than even I anticipated, but I’m still looking forward to it.

Labels: , , , ,

December 17, 2019

Refactoring an old web site


The process of refactoring historyofcuba.com has begun.
When I began to code the site way back during the first Clinton Administration, it never occurred to me that one day, in some near future, I would be browsing websites on a telephone… but here we are.

It’s not my favorite way to see something… but you can’t argue with the convenience of finding something you need right now. Still, you won’t catch me watching Star Wars on a phone screen while riding public transportation… I still prefer a big screen most of the times… but I can see wanting to browse the timetables during a long bus ride.
The process of bringing site up to full modern coding standards is not new. Last year minor coding updates were made here and there but had to be set aside… until now. The process seemed too large and overwhelming, since I’m doing everything myself.
This process will include:
·        Update to html5 as needed
·        Update various CSS files
·        Remove old JavaScripts (no firing squads, just a hand-shake)
·        Fixing/updating bad links
·        Perform minor structural maintenance & some file reorganization
·        Minor corrections
·        Review the pages
·        Update NAV systems
·        Re-do the Galleries
·        Re-do some of the timetables
·        Remove ads and old links
·        Implement mobile tech where appropriate
The first phase will be the home page, which is tied to the menu2.css stylesheet. Originally this page was designed for the large screen, but screen-breaks were added for smaller screens.
The first part of the change will be to convert the style sheet into a “mobile-first” style sheet.
Aside from styling the Home Page, menu2.css is used on various menu-type pages, offering brief introductions to sub-topics and lists of related content and topics.
We’ve come a long way since the emergence of the flat screen.

Labels: , , , , ,