Getting started with local WordPress development and a log for free-press development

Over 2 months ago, I wrote about starting work on my own theme. This has been slow going but I have actually learned quite a bit even for being a thing put on the back-burner for awhile. 

First, local WordPress development is easily doable on OSX using MAMP. After installing MAMP, you’ll need to point your “Web server” to a clone of the wordpress download (found here).

MAMP preferences, access these by pressing ⌘+ , 

Once you have the document root set to the proper place, click “OK” and then “Start Servers” on the main MAMP window.

This will open a start page with some info about the local MAMP instance running. Click on “My Website” on the top nav, you’ll be taken to a screen that’ll start the WordPress setup.

After all this is done, you’ll have a local version of WordPress running. Now, to start developing a theme, you’ll need to create a theme inside the wordpress folder on your computer inside the wp-content/themes folder. Themes should not include numbers in the name (according to WordPress docs).


I’ve been very slowly working on the free press theme and today I was working on it and I decided that I should keep a log so I’m not making small posts about all the things I’m learning or running into while developing it.

You can see it updated in real time here: Free Press development log

Chrome console output notes

Below are some cool console.log tricks that I recently have been learning about.

Add CSS using %c

Change Styles: use the %c formatter to style everything that follows.

console.log('%c Hello World', 'color: blue;');
console.log('%c Hello %c World', 'color: blue;', 'font-weight: bold; color: red;');

Each %c acts as a delimiter which means everything following will take the styles added to the next param passed to console.log.

Clear the console

This one just happened for me one day since I use it so often in iTerm2, clearing the console makes it easier to read and digest the console log. To do this just press: Command + K on Mac and Control + K on Windows. Btw, this is the same shortcut for iTerm2.

You can also add it to your code and it’ll work by just adding in clear(). This will help debugging code a bit easier as you’ll only see what your code should be showing. 

Display objects or arrays

If you have an object like below:

user = {
id: 123,
twitter: '@usmanity',
location: 'california'
}

You can print this in an easy to ready format by using console.table() like console.table(user) and it’ll display like this:

Same goes for arrays.

I’ll try to share more tips if I come across more! 😀

Mid-May update

In the past 2-3 months, I’ve been writing way more code and relatively more blog posts than I had before starting this blog. This has been mainly due to my goal of being consistent about things that interest me.

I’m writing this post because I haven’t posted in about 10 days and I was getting anxious to write something. This post is kind of like an intermittent update because I have been busy lately but I think most of those things are not very interesting to post about.

Cycling: I’ve started riding my bike again, after about 11 months of inactivity! My bike was hanging on its hook for so long that it had collected dust on all the components! I had forgotten where my pump was and took me awhile to find it. Below are my stats from Strava for cycling:

Strava stats as of May 16th, 2018

I don’t want to be unrealistic but I do want to ride a couple of hundred miles if I stay consistent.

Books: after finishing The Three-Body Problem, I wanted to read/listen to something non-fiction and I started listening to A Fine Mess by T.R. Reid. It’s a book on taxes and I did enjoy it. I have a draft post about it but I’ll talk more about it in that. I’m also reading a fiction book called Mattimeo by Brian Jacques, it’s a children’s fantasy novel about anthropomorphic mice, second in the Redwall series. After my experience with Watership Down by Richard Adams, I’ve been feeling many different things, like the whole story is so magical and profound yet so dark and simple that it kind of hurts to think about how real it made me feel. 

Code: I’ve been trying to stay consistent about learning Node.js and using it to build something. Also, I’m practicing things like python and javascript when I have some down time, this has been mostly for fun. I’m itching to build something big but I don’t want to misperceive my little bits of new information as newfound confidence.

The Joy of Tidying (and finances): I didn’t really know what to call this part but one thing that’s been part of my everyday thinking has been the notion of “less is more” and also using a recently learned problem solving principle called Occam’s razor to clearly focus on things. I remember when I read The Life-Changing Magic of Tidying Up by Marie Kondo last year, it really opened up a new way of looking at my possessions. It started with just the things I had and how many of them I wasn’t using or wanting yet they all were in my house, taking my room and requiring my time. 
Once I simplified my clothing, books, and other possessions, I started to think of abstract noises and complexities like finances, digital presences, online shopping, and even apps on my phone. This has been a topic of research for me as most people in my generation are dealing with this in various ways, I want to find an approach that’s not Draconian and still lets me enjoy my time with these things and without them. More on this later! 

Apps I use to listen to audiobooks

I’ve posted about a couple of books I’ve recently finished by listening to them as audiobooks and I wanted to share how I go about doing this since buying audiobooks can be pricey (since you can’t find them used or cheaply on Amazon).

Last year, I subscribed to Audible, it was pretty good except when you want to listen to more than one book a month it was a bit inconvenient knowing that you’ve already paid for the month and used your 1 credit and now have to wait till the next month. I was hoping for more of a Netflix experience just because I’ve been spoiled by it.

So I found Libby which drastically changed how I listened to audiobooks. Libby lets you borrow ebooks and audiobooks from your local library with a few taps in the app! The best part about is automatic borrowing, this works like this: first you search for a book and if it’s not available to borrow (since the local library only has a limited number of digital copies), you put a hold on it, when the hold is ready to be borrowed, Libby will send you a notification/email informing you that the book has been checked out!

Libby is a great option for finding most books and if you’re like me where you’re often waiting for some books to be available to borrow, you can also check out Otto, it’s a $10 per month subscription and it does feel more like Netflix for audiobooks. On Otto, I find books I usually can’t find on Libby or books that aren’t available on Libby right away.

I have stopped using Audible as a primary audiobook platform since it’s very expensive compared to Libby and Otto. 

There’s one more way to listen to audiobooks that’s virtually free, Spotify. There are a bunch books that are mostly books with expired copyrights so English classics are pretty easy to find on here. Some Charles Dickens and even the whole Sherlock Holmes series are available on here but they’re a bit harder to bookmark and listen to since Spotify does everything by track so there’s no spot-keeping of any kind.

Libby: https://meet.libbyapp.com
Otto Radio: https://www.ottoradio.com

Samson’s first swim!

Samson is 1 year old now and for his birthday, we decided to take him to John McLarren Park. If you haven’t taken your dog there, I recommend checking it out! Below are some videos I wanted to share!

Btw, his birthday is kinda made up since we don’t know which day he was born on. We got him when he was 2-3 months old (and super cute) and so we pinned it to be 4/20 🤙🏽.

Swimming for the first time

Swimming across the pond!

The pond is small and so is Samson so this was a big challenge for him! It took awhile to convince him to swim across but after he did it once, he kept going!

The Three-body Problem

A few months ago, a friend recommended The Three-body Problem by Liu Cixin (translated by Ken Liu from Chinese to English). I listened to it as an audiobook.

This book is a different kind of science fiction! It starts out with at the Cultural Revolution in China in the 1960s and then sets the beginning there and then it skips ahead to present day for most of the book. 

Without spoiling much, the book does have a good science fiction plot but I got a bit bored with the amount of science that was being explained and some was just too out there to keep up and it started to feel like a textbook than a sci-fi novel. 

I did like how real the book felt through the early chapters with the characters being very well developed and described, later on, the characters started to feel predictable. 

If you’re looking for a sci-fi book, definitely read/listen to this book! 

I’m probably not going to continue the series, but that’s my opinion. 

Say something nice

I love people who are helpful and caring. I think it does require effort to be nice and I think it’s important to recognize people who are nice!

Thank you to everyone who is nice!

Hitchhiker’s Guide to the Galaxy – Review

When I first started listening to audiobooks, I tried a couple of different books whose name I don’t even remember and I never got past the first few chapters. Last year, there was something different, I tried listening to the Harry Potter series. All the audiobooks in the Harry Potter series are narrated by Stephen Fry, who also narrated the Hitchhiker’s Guide to the Galaxy

I went in with high expectations, the whole Harry Potter series, over 100+ hours of listening was so easy because of the writing and narration but I think I might’ve made a mistake of putting too much emphasis on Stephen Fry’s voice and not enough on the story itself.

The book is very short compared to most sci-fi books and it’s also pretty short as an audiobook. This meant not a lot of environment building, long stretches of conversations, things moved very quickly so I wasn’t used to that.

The science fiction didn’t connect for me, there were instances like how the characters from other planets were completely fine communicating with Arthur Dent and Ford Prefect even though they had never gone to Earth (except one). I think the comedy was a bit too out of my league and I didn’t get it.

I think it’s a good book and especially when it was written, it must’ve been a very good book but I think now it felt like some things were just not as expected for me. 

I recommend at least given the book a once over but it’s not one of my favorites. 

Watership Down, a fantastic novel

Hazel, Fiver, Bigwig, Nipkin, Dandelion, and so many others have filled my imagination for the past two weeks or so. I was listening to the audiobook version of Watership Down by Richard Adams, read by Ralph Cosham. It’s a fantasy book about a group of young rabbits leaving their warren all based on a feeling. They meet many friends and foes and along the way you learn about the habits of rabbits.

The novel is different than some novels I’ve read or listened to about animals being anthropomorphized. The most striking comparison I have are the Redwall books.  In the world of Redwall, the mice and other woodland creatures have many characteristics that are human or make them sound and act like “civilized” creatures. Not to say that living in a warren or burrow can mean you’re not a colony of civilized animals. In Redwall, there’s the concept of the main Abbey which is built by mice and all around the story of Redwall, countless creatures battle over control of Redwall using human tools like swords, bow and arrows, and even siege equipment.

In Watership Down, the rabbits and behave like rabbits. They use a language called Lapine, a language invented by Richard Adams himself to convey some words or phrases that the rabbits would use and humans just never thought about. Some of my favorites are silflay which means grass and the act of grazing, hrududu meaning a motorized vehicle, and Hazelrah which is a name and a title for the main character. “Rah” is a suffix meaning a prince or leader. It just rolls off the tongue so well! A lot of the language is based on the sound or changed into Lapine to sound more “rabbit-like” and for this I think Richard Adams did a great job. If you’d like to learn more about Lapine, this glossary page is a good one: http://watershipdown.wikia.com/wiki/Lapine_Glossary

I can’t summarize all the characters but the spiritual and out-of-this-world emotions that I felt from things Fiver said and experienced made me really love this book. The way he acted in the beginning to how his character developed into a savant from an obscure little brother made this book just so much better. Hazel’s character developed a lot but his character was predictably changing, I did not anticipate the changes and experiences that Fiver went through. Other characters were so good in their own ways like how Dandelion was such a good storyteller, Bigwig a brave and strong rabbit, and Pipkin who was a shy and honest rabbit. 

I am aware that the book didn’t do a great job of putting female characters in stronger roles but the book’s a retelling of bedtime stories, I don’t think it was meant to address inequality or to comment on the actual lives of rabbits past the aspects that are mentioned in the book.

The past few days, I’ve done some googling into the movie versus the book and how different they are and I’ve decided to not watch the movie because of how many changes will be in the movie and I would rather keep my imagination filled with Richard Adams’ narrative instead of a reinterpretation of it. 

Overall, I loved this book, I would highly recommend it!

Ready Player One, book vs movie

Ready Player one movie poster (left) and book cover (left)

Last week, right before the movie came out, I finished listening to the audiobook version of Ready Player One, narrated by Wil Wheaton. The narration is great, fun, and I felt like Wil Wheaton is Wade Watts! I would highly recommend listening to it if you're up for a sci-fi book, especially if you're a pop culture junkie. So many references, I couldn't keep track!

The movie is a good effort towards taking Ernest Cline's vision from the book and turning it into a movie. I was wondering how the movie was going to be made because of all the licensing and copyright issues with every single thing mentioned in the book. I'm sure it must've taken a lot of back and forth between many many different people but in the end, there was a good deal of pop culture references that it didn't feel like the movie missed out on much.

What the movie did miss, the plot, it was so different that it felt like the book was used as a environmental setting, introduction of characters, but…it completely missed some of the important pieces. Tye Sheridan plays Wade Watts in the movie and I have nothing against him but I think the casting should've gone with a more appropriate actor to play Wade. A husky, nerdy, and maybe awkward kid would've done a better representation of Wade from the book.

What follows might be spoilers if you haven't read the book or seen the movie but I feel like they're important to compare. The movie completely ignored the clues from the book and I think that's a great approach, I felt like it was new clues to solve. I did like the reinterpretation of the Grail diary from the book in which it was just some sort of a written database into an actual building the characters walk into and on top of that, it was also very well digitized and a couple of scenes that were shot in it were truly futuristic. 

Some of the scenes were very well shot and produced, action scenes were new and exciting as the production team had a lot of freedom to work with since the OASIS is a digital world in which they can do whatever seems appropriate. 

Overall, I think it's a fun movie to watch and the book is different enough that they should both be given attention. The movie's interpretation is different enough that I believe it's almost a separate enough endeavor to just share names but not much else. Go read (or listen to) the book and then watch the movie!