Treefingers

The tough part about moving from front-end to server-side

So this is a personal struggle I have right now, every time I want to start a new project, I get too involved with the technical details of how it'll all fit together. This is fine if I'm only working on a project that's personal but some times it bleeds into work as well.

One main technical concern that has been bothering me recently is deploying code to a production environment. This might seem laughable to some people and some others might know what I'm about to say.

Deploying code to production is hard, even in 2017! I don't know what the year has to do with it but still, you know, people say that all the time, since this is 2017, maybe things should be easier to do and there should be simple ways to getting code to production. There are I guess, some things like docker and virtualization of some sort that can make the process somewhat simpler but it doesn't make sense for a small project to require 70% of its time on deployment.

Even with this blog, I have a pretty primitive setup for it. I make changes on my local environment, I commit those to git and then on the blog server, I just pull down the changes. If there are migrations that need to be done, I just run those and then try to refresh the blog a few times, and most of the time it works fine.

Moving from being a primarily front-end developer, I never had to think about the deployment of assets, pages, and everything related to a site, I took it for granted about how APIs were made available for the front-end to consume. These days, I'm looking at different ways to deploy and to deploy properly since I want to work on some projects that aren't just for personal fun. Shoot me a message if you have good learning material on this, email me.

A really simple palindrome checker in python

Python makes writing quick checkers pretty easy so I wanted to post this one since it's a fun few lines:

def palindrome(string):
    if len(string) > 1:
        n = len(string)
        if string[0] == string[n-1]:
            return palindrome(string[1:n-1])
        else:
            return False
    else:
        return True

words = ['racecar', 'noon', 'samson', 'kayak', 'bilo', 'heisenberg', 'radar']

print('Checking some words...')

for word in words:
  print(word, palindrome(word))

You can see the program on github: here


As an effort to share things I'm learning and playing around with, I'll try to post things that others might find useful. No groundbreaking stuff yet!

Start over again for python

So the past few weeks, I've spent learning the basics of Laravel and using it at work. It's been super fun and useful to learn some good practices to use at work and apply some with my blog too.

But over and over, I keep wanting to use python. The desire comes from how quickly I put together my data website. It was quick and fun but I felt like I was hacking together some fragile system. So I keep jumping around back and forth and not actually sticking to anything to learn it. And so going forward, I'm going to be spending my personal learning time to learn more python just because it is appealing and fun to use for me. Any recommendations are appreciated!

A movie search page

Learning Vue.js has been a fun experience so far. I've been using it to build this project that let's you check out popular movies and search for any movie on The Movie Database.

Check it out here: movies

Coding Katas

I recently found about the concept of coding katas, practicing basic programming concepts and writing code that reinforces a technique. Think of it like stretching for athletes but for programmers. It comes from the Japanese concept and word for karate kata, and repetition and building on already learned concepts leads to improvement.

I am going to start doing these more often and I've found a couple of sites that help with these that I want to share:

  • Awesome Katas, a long list of katas and links to many other places with katas
  • Code wars, uses the concept of katas to reinforce learning in many different programming languages
  • Hacker Rank, not necessarily katas, but it's still practice
  • Leet Code

Hopefully, this list is helpful and leads you to learn something new. 😀

Blog to-dos

I work on my blog here and there to learn something new or try something new and also have an end goal which ends up being an added feature or fix for the blog. I work on these things maybe once or twice a month but I am starting to spend more time on them as the blog is getting easier to work with.

Adding markdown was probably one of the less painful and more dreadful things I did because I wasn't using vue before that. Now I'm using vue to render the markdown in the single post view and in the writing mode. 😹

I want to share a link to all the upcoming features and things I'm working on.

Blog todos: https://www.notion.so/Blog-to-dos-e8f3c5693b4246bb8f5d4ebe09b44be6

Back to seeing more posts

So after I messed up my blog a few days ago where only one of the oldest posts would show up, the rendering was messing up because of how I was passing the $post model from a list of $posts. I decided to go back a step and render using the laravel-markdown library so that rendering can happen on multiple posts properly.

I was feeling a bit stuck not being able to post with photos but now that's taken care of with markdown.

I'll work on embed soon but until then, I'll using Notion to post embedded content.

This post will be hidden for awhile

This post won't show up on my blog's homepage unless you're following the blog some other way. Right now, I've basically made it impossible to load more than one blog post because of how I'm including the post inside the index.blade.php file.

😇

Images plus bugs

So I spent about 3 hours today trying to get markdown working for the editor.

I realized that a blog without images starts to get boring, especially if I'm not writing a lot.

Some bugs

Now there's a bug where only one post is showing up on the homepage, I'll get to fixing that soon.

I got a dog!

I got a dog and his name's Samson. I'll post more about him later.

Seinfeld Kristen (Labels)

I wanted to make a Seinfeld replica but replace it with Kristen's name so I made this:

http://usmanity.com/labels/kristen-seinfeld

Labels - Ceramidin

So last night, I had this urge to work something simple and fun so I decided to create a label in CSS that looks just like the real life version.

My inspiration was Kristen's lotion that she had sitting by her and I picked it up and started working on the page.

The end result is here: http://usmanity.com/labels/ceramidin

It's pretty simple and the original looks like it here: http://www.sephora.com/ceramidin-liquid-P382355

I am going to create more labels like this one so I've created a labels homepage here: http://usmanity.com/labels/ceramidin

Adding posts from the UI

This might seem like a given for a blog but for the past month, I didn't actually have any way besides the command line (or going into the DB) to post a blog post! Now I am able to post through the UI so I am looking forward to posting more often!

Average posts per week

I'm starting to think of ways to get more out of this blog. The primary focus of this blog is to share what I'm learning and to accomplish that, I use the blog itself as a place to learn. Working on features for the blog is fun, isolated, and pretty much under my control since I have no real users besides myself on it.

I want to start measuring how many posts I'm doing per week, as an average to see if this average will go down or up over time.

Now page and favorites page

I've been updating my homepage every few days to keep adding details, fixing some things, and getting closer to "done". Yesterday, I was on Derek Sivers' website and I noticed instead of an about page he has a "now" page. I really like that, it like a middle ground between an about page and a twitter feed and that's something I would like to have. I'm also adding a "favorites" page which I want to add things like "my favorite movie right now" and "my favorite song these days" because some things you want to keep around for 1 week, 1 month, or even a year but they don't need a full page, maybe some shared real estate. Still, it'll be an experiment.

Setting up simple routes

Tonight, I setup simple post id based routes. Now posts can be clicked on and each has its own "url". There are many things I have to do next, one of them being pretty URLs but before then, I'm going to work on getting this blog looking like a real blog and not just a bunch of unorganized text. <<<

Moving to my own blog

So this is it... After years and years of having unmaintained blogs on various different platforms, I've decided to just build my own blog. Here's hoping this will keep me interested, fingers-crossed 🤞.

One of my main reasons to run a blog is to keep some thoughts I have out there but I have run into one problem over and over. I am always unsure on what to share and what not to share. And these things I'm afraid to share aren't controversial or outrageous things, they're mostly things I think aren't important enough to blog. So, hopefully some of my blog posts are useful to someone out there!