Updating Old HTML Webpages
|

Updating Old HTML Webpages

Most websites are simple. They have five to ten pages at most but usually a single page is enough. Most pages are about one specific thing, whether it’s a CV inspired page to find new clients or a simple page with a few products. Most are usually about a single topic. 


This makes website maintenance and design simple, because one theme fits every page. My website is different. It has articles about the Romans, Geography, Environmental Studies, old student newspaper articles, Media studies pages and more. In effect it is several websites rolled into one. 


The challenge with updating this website is in the size of the website. Since 1996 I have been adding pages, until about 2003 when I switched to wordpress- The website still has a thousand or more individual pages. Every time I update I have to update hundreds of pages. 


Recently I converted the surfing the World Wide Waves section to PHP, including one php page where I put the articles into arrays, and individual pages that load the title, content, navigation and more. The Surfing the World Wide Waves session is now a simple to edit set of PHP pages, rather than 50 individual pages. I can edit the navigation in a single place, rather than for each article. 


For the sake of consolidating my knowledge I was watching a learning path about HT and I saw that one challenge was to take an old HTML page, and improve it, to be a semantically correct web page. This is a process that I have done several hundred times over the years. 


I created style sheets, one for the Romans section, another for the Surfing The World Wide Waves Section and one or two other CSS files, where one CSS file is used by multiple pages. It helps to make the website uniform. 


Removing Tables and Inline formatting


Front Page 2000 and other website editor software added a lot of code, inline, which, today is not needed. Part of the process of going through the old pages is to strip out old code and replace it with modern code. I replace tables with divs, strong, and other tags with headers and more. I make it so that the website uses less code. 


Old pages sometimes have the font, font size, strong and other tags for each p tag. That’s a lot of code, for a page where CSS does the same thing, just once per tag, header etc. 


A Quick Tip


If and when you’re working on an old page you may find and other tags. In VS Code you can search and find and use find and replace to review every individual use individually and it automatically moves on to the next instance. 


I converted some long blocks of text from html to php within an echo tag and I had to escape a lot of ‘. I did this by selecting “‘“ and using find and replace with “\’” to go through every occurrence individually before moving it to an echo tag. I saved time and effort. 


List Items


If you’re working on a list of items you often have to write the same code for each list item and this takes time. With VS Code you can option select the front to each individual item and type

  • just once. With the closing tag you do the same, except that it will auto-complete the tag so that’s even easier than expected. This saves time. 


    Re-working an entire website is slow and repetitive but that repetition is good for two reasons. The first is that it gives me time to think about what I am doing, and to understand why I am doing it. The second is to develop work flows that increase efficiency. 


    I read, assess, clean up and then re-format individual pages so that they’re template friendly. My Surfing the World Wide Waves section is now like a blog, where I have the bare bones code on each page, and the content in a centralised place. If I took one more step then it would be a one page website. As I gain experience I can take that last step. 


    I am now focused on putting what I have learned to practice. I am consolidating what I have learned and finding solutions to practical challenges I encounter while working on my website. 

  • Reviewing EcmaScript 6

    Reviewing EcmaScript 6

    Recently I have spent time focusing on JavaScript and EcmaScript to make sure that I understand it. By now it is over a year ago since I felt that I wanted to study Angular but felt that I didn’t have enough knowledge to resolve the challenges so I decided to return to basics. My return to basics involved a number of courses and books but it also led me to study this Linkedin Learning Pathway. It is easy to study, get a certiciate and move on, especially for extroverts or outgoing people who find interacting with people easy.


    If I know people then I do find it easy. In other scenarios I struggle. I am working to ensure that if and when I say that I have certain skills, that I have those skills. I want to understand what I am doing and why.


    A while ago I managed to get my instagram feed from Instagram JSON files to Wordpress via a number of steps and this felt good but I felt that I did not fully understand what I had done. Since then I have studied JSON, JS and other related technologies so I should be able to accomplish the same task more easily, and with fewer tools. I have to decide whether I want to import this data into wordpress or whether I want to run it outside of the CMS.


    Such a project will encourage me to conceptualise and then realise my goal, without the skeleton of a course behind it to provide me with guidance. I want this to be a self driven project. It will indicate my progress. When I decide to take the plunge I should find the task easy.


    I always find new things to learn, during this pandemic, and these new things keep me occupied and distracted from the eternal return that are these days.

    Online Learning – Alternatives to YouTube

    Online Learning – Alternatives to YouTube

    Between adverts that play too often, videos that encourage people tho shift to the Right side of the political spectrum and sensationalism I decided to stop using YouTube. I have spent two months without YouTube. I use alternative video platforms. I use Udemy, Prime Video, Linkedin Learning, Vimeo and other platforms.


    I stopped using YouTube because it went from being a video sharing platform for individuals to being a broadcast platform where algorithms force some types of content rather than others. I saw an increasing amount of sensationalist headlines and video titles and grew tired of them. I was tired of having to filter out the emotional politically slanted content from worthwhile content. I had to spend more time reporting and ignoring content designed to make me angry or emotional. Clickbait was another challenge to overcome.


    YouTube, although relied on by plenty of people to share video content, has become toxic. Take a look at video tutorial websites, Vimeo and other video distribution platforms and you will see how stark the contrast is. Add to this the flood of video adverts and you have a service that becomes unusable. Sometimes I had two to five minute videos as pre-roll before a two minute video of content I wanted to watch.


    YouTube then asks for 20 CHF or more per month for the same content, without adverts. 240 CHF per year, for user generated content. That is far too expensive, especially when they de-monetised content from normal video content producers with small audiences, and low viewing hours.


    Within the last month I did return to YouTube, but between the sensationalist headlines, and the pre-roll adverts I found that the cost of use became too high. They have made it so that you can no longer browse for content without eventually giving up and watching what the algorithms think you should watch. This is unhealthy. This is dangerous because of how it can polarise people who have not made up their minds about moral, or other issues.


    I bring this up today because I saw that someone said that YouTube is a great school for developers but I do not believe that it is. I do not believe that it is because it is exploitative of content creators. Content creators need to invest hundreds of hours in creating content, sensationalising it to appeal to the algorithms, and then get thousands of minutes of viewing time before they can monetise it.


    I believe that Udemy, LinkedIn Learning, Coursera and other platforms are more interesting for makers of tutorial and learning videos because you can charge people for content. You can provide them with certificates of completion and you can split courses into units and chapters. You can also include files and test them on what they have learned, and get them to revise, if they fail.


    Linkedin Learning


    One of the strengths of Linkedin Learning is that it is bound to your company or NGO e-mail account so you can study for free, via the company that you are working for. When you complete courses your skills are highlighted in your Linkedin Profile, as are your certificates. This is useful to show that you are an active learner.


    Coursera


    I used Coursera for the Google IT Support course, and although the course is 28 USD per month until you complete the course, it is a great learning platform because it integrates with online learning solutions that force you to learn in a practical manner. You have to setup and take down servers, you have to create and remove directories, show that you understand binary, network topologies and more. You also take quizzes and if you fail you need to revise for an hour before you can try again. If you fail again you need to wait 24hours or more before retaking a test. You learn by practicing, and by reviewing. You can give up, but as long as you are motivated you can pass the course. I like their system.


    Udemy


    Udemy is more like Linkedin Learning except that rather than pay per month or per year, you pay per course. The courses are often 200 or more dollars a piece, but they often have promotions where you can get courses for 12 USD or less. This means that if you’re attentive you can get three or four courses for the price of an Entrecote in a swiss restaurant. There is no time limit on these courses, so you are not forced to do every course within a month or year, of purchasing a course.


    And Finally


    Learning is a process. Splitting it into manageable pieces is important. Being clear of distractions is also important. To learn we need to be active, through listening to instructions, and then checking that we have understood what we are doing, and then moving on to the next part. With Udemy, Coursera and Linkedin we can do this easily, and at the end of it we have a certificate of completion. In some cases it is automatically added to our Linkedin profile.


    With YouTube we are flooded with distractions, we are forced to filter through the irrelevant before we come to the relevant, and in many cases tutorials are several hours long. I prefer to learn via platforms where the instructors are forced to be systematic about the courses they provide. If YouTube wants to be a serious contender in the Online learning environment then it should create a new product, YouTube learning, and provide relevant features, to formalise what, for now is a chaotic system.


    I realise that people like to watch five to ten minute videos explaining how to do something specific, via YouTube. For me though, YouTube is too chaotic. I prefer to find a written explanation.

    Playing with WP Rig

    Playing with WP Rig

    Today I started following the “Building Progressive Themes with WP Rig.” course on Linkedin Learning.


    Before you start playing with WP Rig make sure that you have installed Composer. Composer is required to use WP Rig during the build process. Composer itself requires that you have PHP on your machine. After that it should be easier to use. I also ran npm-install-peers because I kept getting error messages.


    During the daily walk today I saw that the grass along the side of the road is dry and dead. It crunshes as you walk on it. As you look at other fields they are dry and probably crunchy too. We had some rain a few days ago, but within minutes of the rain stopping the landscape was dry again. We never get rain. I am impatient for a day of rain. I am impatient to look forward to good weather, rather than bad. It seems to be absurd to want rain in Switzerland. In winter skiers and snowboarders want snow.


    I managed a 179 day reading streak with the kindle before I broke it. It wasn’t that I didn’t read, but that I didn’t read using the kindle. It’s frustrating to lose such a streak because it will take 179 days to get back to the same point. It makes no sense to reach for such a goal in the first place. These apps that get you to do things for an unlimited days in a row detract from the pleasure of doing certain things habitually. I have read a book every day for many months, probably years, but I use Audible, Kobo, physical books and the Kindle. I need to find an app to track reading streaks without it being locked in to one book store.

    A Walk Between Moments of Rainfall
    |

    A Walk Between Moments of Rainfall

    Today I woke early, shopped, studied German, read the news and then studied WordPress Child themes. It rained on and off, and I took a break from studying to go for a walk and I stayed dry almost the entire time. I carried a Sea to Summit three litre bag with me, in case I needed to keep the phone etc dry. For a moment I thought it would start raining but it didn’t so I stayed dry.


    The walk was short, just one hour, as the conditions are not ideal for walking. The views weren’t good and the probability of being caught in the rain was high. I also wanted to walk a route where I did not soak myself and my shoes. On the route I walked, cars were unable to bully me like they do on other routes.


    The course I am studying now is WordPress Building Child Themes and so far I find the course interesting. I have only gone so far as to create a child theme and ensure that it works. That’s when I took a break for the daily walk. I enjoy studying JavaScript, Angular and other ideas but there is a lot to learn, so I thought that by returning to WordPress. I could focus on learning how to use functions, and understand concepts individually, and then return to Angular, JavaScript and more. I want to step my learning. I don’t want to simply finish a course. I want to understand a concept first, and then finish the course.


    I still have a lot to learn about CSS but at least this is a technology where I understand the ideas, even if I have not played with all of the tools, or learned of plenty of solutions yet. That is the point of step learning. You learn, get comfortable, and move on. I can also learn what I learn now, to move my entire website into a CMS with different sections having a different look. I have aspirations, and they will force me to learn how to implement them in WordPress.


    I will spend more time studying, now.

    Web Dev Studies During The Pandemic.

    Web Dev Studies During The Pandemic.

    During this Pandemic, I have decided to study Web Development and I am slowly making my way through one or two Linkedin Learning Pathways. In the process, I have learned about CSS, PHP, JavaScript ECMAScript2016, Frameworks and more.


    The course I have studied are:


    Angular Essential Training / React.js Essential Training / Git Essential Training / Learning ECMAScript 6 /Node.js Essential Training / Javascript Essential Training / RubyonRails Essential Training / CSS Essential Training / Ruby Essential Training : 1 The Basics / Installing and Running Ruby On Rails 5: Mac / Programming Foundations: Web Security /PHP with MySQL / Essential Training 1 and 2 /PHP Essential Training / Programming Foundations: Databases / Responsive Layout / HTML Essential Training / Introduction to CSS and CSS Essential Training.


    With these studies I am getting a good overall appreciation of the options and solutions available to web developers. When I complete the “Become A full-Stack Developer and Become a Web Developer Courses I want to focus on a single framework and try to do everything from scratch, from setup to deployment, or at least to it being “completed”.


    It’s easy to watch hours of videos and not learn much. It’s for that reason that with these courses I have re-written every line of code and when it did not work I persisted until I resolved the issues.


    With CSS I took the opportunity to re-work the entire website. I made it mobile compliant and more visually appealing. I plan to take the same approach to learn about frameworks, taking my website and its sections, and using a framework as a CMS.


    For now I need to keep progressing with the learning pathway. I have eighteen hours of courses to go but that’s without including the hours of effort put into getting things to work after I’ve written the lines of code.


    At least this is a productive way of taking advantage of being in self-isolation for the foreseeable future.

    Day 63 of Self-Isolation in Switzerland – A 15 Kilometre Loop

    Day 63 of Self-Isolation in Switzerland – A 15 Kilometre Loop

    Today I walked a 15-kilometre loop because I saw people walking two abreast and decided to retrace my steps a short distance before trying a new bifurcation. By the end of this walk, my legs were starting to get tired. I walked non stop for over two hours before a quick stop at a petrol station to get some drinks before heading home.


    Before going on my walk I finished the CSS course on Linkedin Learning before starting another one on HTML. It’s not that I need to learn about HTML so much as I have a desire to complement what I already know.


    After passive learning I re-worked some more pages on the HTML part of my website, adding CSS to two or three pages. As a result of what I have learned over the last two or three weeks doing the same thing as I did for the index page for another directory took half an hour or less. What I learned is sticking in my memory. I still cut and paste, but the process is much faster.


    Links from HTML Essential Training by Jen Simmons


    The more I look up and learn, the more ideas I have for how to modernise my website. For ages I wanted to keep my website as a museum of what the web used to be but as I made pages mobile friendly that desire to keep things the same has altered and now I want to modernise it.


    From a visitor point of view this may be a waste of time, as certain parts of the website have little to no traffic. This doesn’t matter, because in the grand scheme of things every page I modernise gives me experience in dealing with CSS, Javascript, navigation design and more. I may be slow on the first pages but as I work my way through the website my efficiency will go up, and with that so will my employability.


    We constantly need to learn skills and working on a website, rather than browsing social media, is a great way of doing so. As I looked through Flickr galleries I saw that some people have images of people re-enacting Roman soldiers and other people have images of Rome as it looks today. I could easily breath life back into that part of the website by contacting people and getting permission to share their images.


    I’m glad I am working on my website as a project again. It is effectively filling my time, encouraging me to learn more, and getting me ready for a line of work I enjoy.


    See you tomorrow.