Today, I did a few quick fixes to the current layout of this website.

  • I added « Previous Essay and Next Essay » links to each piece of writing at the end for easier navigation

    This required a slight modification to the templates. Found the following article Jekyll – how to link to next/previous post on your blog very useful in this venture. In fact, it is very simple. Like so:

    <style>
      .not-post-page-navigation {
        display: flex;
        justify-content: space-around;
        margin: 1em;
      }
    </style>
    <div class="not-post-page-navigation">
      {% if page.previous.url %}
      <a href="{{page.previous.url}}" title="{{page.previous.title}}">&laquo;
        Previous Essay</a>
      {% endif %}
      {% if page.next.url %}
      <a href="{{page.next.url}}" title="{{page.next.title}}">Next Essay &raquo;</a>
      {% endif %}
    </div>
    

    I also had to look up how I could show you the code above because it had some inline liquid syntactic sugar. So the parser simply interpreted the code about as any regular code. You need to add raw and endraw tags before the code and proceed as before! See Liquid syntax highlighting in Markdown

  • I also re-wrote the little script that I wrote in Swift a few days ago in Java. I’m basically jumping between languages because why not. Had some hiccups with looking up regular expressions syntax in Java. Here is the current working copy:

    public static void main(String[] args) {
          if (args.length < 1) {
              System.out.println("Please do like this: LazyTitleMaker <title>");
              java.lang.System.exit(0);
          }
    
          DateFormat dateStyleFormat = new SimpleDateFormat("yyyy-MM-dd");
          Date currDate = new Date();
          String currDateText = dateStyleFormat.format(currDate);
    
          String input = args[0].toLowerCase();
          String inputWSReplaced = input.replaceAll("\\s+", "-");
          String sanitizedString = inputWSReplaced.replaceAll("[\\',?]", "");
    
          String resultantURI = currDateText + "-" + sanitizedString;
    
          System.out.println(resultantURI + ".markdown");
          System.out.println("Length: " + resultantURI.length());
      }
    

    Need to fix the following code that you see above at some later time

          String sanitizedString = inputWSReplaced.replaceAll("[\\',?]", "");
    

    I wanted to find all characters in the string that are not words and not spaces. I expected [^w] to match to all characters that are not words and [^s] to match all characters that are not spaces.

          String sanitizedString = inputWSReplaced.replaceAll("[^\\w\\s]", "");
    

    Similar to how I would do it in JavaScript

    "Some Str,in'g?"
      .toLowerCase()
      .replace(/[^\w\s]/g, '')
      .replace(/ /g, '-');
    
  • I also changed the about page and the projects page
  • I added a new template for the about and projects pages

    Modified the way images are displayed in the liquid templates. Replaced {:width="60%"} with {:style="max-width:100%"}.

  • I removed the newsletter link at the footer
  • I adjusted my project involvement for Screenhole and Keyframes. Until further notice my involvement is on pause while Thinko focuses on other things. I enjoyed working with the team and hope to do so again the future. Jacob and Pasquale are wonderful.
  • Played with modulo and reminder theories decoding a birthday message 1, 2.

It is fun to make things for no reason other than just because. So, what do I think about: If you don’t share your project, did you actually make it? While I think it depends on the project and the goals, I think that decision is ultimately up to you. It is very easy to fall in the trap of sharing for the sake of sharing. For me — I first look at the project and then I look at the goals. Most likely than not the things that I share I hope others to find useful and educational.

Links for today:

Unless otherwise mentioned in the post, those projects are side projects which I work on on weekends and evenings, and are not affiliated with my work or employer.