Timeline

Trial and plenty of errors

I know last week I mentioned I was going to be trying out some applications for desktop blogging.

Indirectly, I guess.

But yeah, I will be doing that. Those posts will be on my random blog because this experiment is not really for me. I’m super comfortable on the browser and like having a bit more control over things. Even more so when trying to do a random tutorial, or resource, or just a code snippet I found worth sharing.

Anyway.

The week is of course filled with those little errors and a few trials. A lot of focus on getting my resume updated. I created a page on this site to make things easier for me in the long run. You can ask me about it if you’re really interested. No reason to really share it this way.

Other things

The thing that has been really driving me crazy for the better part of the week is that I really want to create something.

Well, I want to fix something. I just don’t know what project. I am really liking the way Gutenberg is slowly starting to take shape but there are, and will be, some issues here and there. I may look into this more since I know it will be a huge win for me personally.

I know that I need to draw more too so this needs to happen at least once a week.

Code related

I’ve been a little discouraged this week when it comes to reading about code. A lot of that is because I like solving issues. During the week I tweeted out something that I think I want to work on:

I like using GitHub until it comes to seeing notifications.

it would be sort of nice to filter out some of those— Jose Castaneda (@joemcasta) August 23, 2018

What I was thinking of doing was create a small Tampermonkey script that has two buttons. One that toggles the issue notifications and the other toggles the pull request notifications. Only reason is when I go and check to see what kind they get mixed in together. 

I may get a little fancier by choosing to filter between open and closed issue notifications though. I had to look at the DOM markup that is on a page and this helped me out. First I just have to get a decent looking UI for it.

Trying applications

This week I wanted to change things up a little bit. The week consisted of maybe one or two forum replies, one post read on code, and some Lego City on the Switch.

Part of that reason is because I wanted to try using an editor. An app editor. First one on the list was QTM. The second one being BlogJet. Followed by Open Live Writer. Then BlogDesk. Finally, using the WordPress.com app. These are options currently available. They may not be available in all platforms though. Will get into more detail later on.

QTM

qtm-windows-beta

The cool thing I liked about QTM was that it is open source. I’m trying QTM on my Windows machine. At the time I’m writing this the application is in beta so they may add things, remove things, or even fix other things.

Another thing I really enjoyed was that it does support some of the APIs WordPress offers. Now, I only say that because I’m trying it out on my personal, self-hosted site, and for posts only. I’m not going to try on pages or other post types. There is a reason I wanted to only try posts. This application does seem to be more on the higher end of power user because it sort of removes a lot of things and only seems to have support for publishing posts. I haven’t yet found how to retrieve posts so I can edit prior posts just in case.

I’m not entirely sure how I feel about it yet, but I have a feeling I may not use it for long and I think a lot of that comes from the lack of being able to edit previous posts. This is a feature that I know a lot people need to have. It’s a basic necessity for blogging and maintaining your blog.

BlogJet

blogjet

BlogJet does seem to be a little more polished in that it offers almost the same interface WordPress has. The categories, tags, status, comments, trackbacks, and even timestamps are editable. It also provides the ability to edit other posts from the site. The image on the right sort of shows what that interface looks like. I can really see myself using this. I think the only downside is that it is not free. For me, that is a down only because let’s face it, I don’t like to pay for some things. The perk on this is that it also has support for other platforms as well even, if you don’t have a WordPress site.

Open Live Writer

open-live-writer

Another that I am trying out is Open Live Writer. It works very much like the editor I’m used to on my personal site. I may try this on my other random site that I haven’t blogged on in a long time. It does feel good to write. The interface is very Windows. It really does remind me a little bit of Word. That’s a good thing. I think it makes it a little easier for people who may be making the transition over. I may end up using this one more often only because it does feel more familiar. I think the only downside might be that it is only for Windows; that is because it is a fork of Windows Live Writer.

BlogDesk

There are two more I will be trying out as well. BlogDesk and the WordPress.com desktop app. BlogDesk does appear to be somewhat outdated. When I took a look at the changelog, the last entry was nearly 10 years ago. I’m not sure what, if any, support it will have down the line but it still works. I’m not sure I will be able to find support for headings, only if I manually add them. This isn’t a good option since many may not know how to do that.

It works great if you are doing simple posts and by simple I mean just writing. You’re not creating an outline, or syllabus, but just writing. There are options for simple formatting like underline, italics, strikethrough, and bold. You can insert, edit, and remove links with a few button clicks; same applies to images. The nice part is that all of these applications handle the uploading for you.

WordPress.com app

The WordPress.com app I’ll have to dedicate a post for and hopefully will get that for next week or maybe I’ll dedicate a post for each one. I may just do that. Dedicate one week for each one and share my experiences on here. The good, the bad, and the amazingly ugly things I encounter.

Final thoughts

I swear there really is a reason why I did this too. I know there will be benefit down the road not just for me but for other people as well.

Life happens

Yes, late for this one. The last week was another slow one. I didn’t do a lot of reading, or researching of things.

I am actually pretty bummed by this one because it means that I didn’t reinforce the knowledge. I mean I can learn from it which is what I plan on doing. The next couple of days will be need to be heads down and somewhat glued to the laptop.

There are days when it feels like I struggle to find my rhythm and a lot of that does stem from not actually getting up when my alarm goes off.

One highlight might be that I changed themes and I used Photoshop to create the header for it. I smudged a random image I found via search and added a few other things. Made up of about eight layers in total. I wanted to add something else but I think I’ll save it for some other time or some other header.

One other thing to share would be I helped out somebody with their site by updating a few plugins and finding a fix for their page template. This helped solidify what it is that I really like to do and want to be doing.

The page template was a little painful to look over but the previous developer was nice enough to comment on the things they did. As it had turned out they were using query_posts() to create a blog page. The theme made a mess of things but I can’t fully blame the theme since it was the developer who may have changed things around.

Will have to see what the rest of this week has in store for me.

A learning path

Over the last three weeks I shared a few things I read and sort of learned along the way. This week I, again, focused a little more on support but did dive back into learning things again. What was really awesome was a tweet I saw and it felt like I really was meant to see that.

The tweet was by Chris Coyier:


For me, that is fairly true. I picked up CSS first, then HTML before wanting to learn JavaScript. Some of the things clicked instantly and some took longer than others. JavaScript being the one I’m still sort of learning. I say that because I’m finally comfortable enough to really break things on purpose to see what happens.

Now, I did mention I was debating on updating my laptop to Ubuntu 18.04 last time and I did. It’s been good. There are a few things I’m still learning about Ubuntu but overall it has been good that I only had to restart it once after an update. If it was my desktop ( running Windows ) I would most likely still be updating random things.It’s been really irking me that I can’t remove some apps without resorting to the command line. This was after a reset.

I guess enough griping really, I’m lucky I have that desktop. I built it a long time ago and it is still running. I just need to find the time and dust it out. It has been quite some time since I last did that anyway.

Okay, back on track.

The cool part is that things really are starting to make sense to me when it comes to working with ReactJS, Redux, and React Router. I had encountered an issue where the page would not render the content properly and would show the error message instead. I was using a try...catchstatement in order to display things. It looked a little like:

try {
  render(
    <Provider store={store}>
      <SitePage/>
    </Provider>,
    elem
  );
} catch(error) {
  elem.innerHTML = "Welp, something went wrong...";
}

I kept only seeing the “Welp” message. This morning I found out it was because I was loading the Provider from the incorrect module. It was only react that I had typed instead of react-redux. I felt a little silly but I laughed at it.

I’ve been trying to laugh more about the little things like that instead of worrying or getting mad.

I’ve tried watching a few videos as well and they have helped some but I think that writing out the code helped more because it has helped with the muscle memory. My biggest issue right now is that I feel very everywhere. I can’t seem to focus on one window at a time. It’s only when I am reading that I can truly sit down and keep that focus going for more than five minutes.

As for the things I read, I did compile a small list of just a few things that did help me a bit more. I tried to start it at the beginning of the week and updated when I actually remembered to do it.

Things I read:

Slow week

This week I focused more on the free support forums. This was in part because I took a small break from reading about Docker Compose and setting up my local environment on Ubuntu. It was cool to see the environment get built with a simple command. I think the biggest hurdle I encountered was I couldn’t find an article that goes into detail how the docker-compose file sort of works.

Many just gave a sample that works, that’s great, but I would like to know what it actually does. For example, what the markup actually means and their subtle differences. The volumes is a good example of that. Now, I don’t know why wordpress:/var/www/html would not work but "wordpress:/var/www/html" would is beyond me.

So it was nice to get away from troubleshooting my own issues. It’s been too long since I last did that.

It felt good. It felt really good.

There is one topic that is still on my mind because it dealt with editing JavaScript code. It was for one of those quote of the day widgets. The difference was where those quotes were stored. It was inside of a text file uploaded to the site. I guess I could see some potential good but personally I would opt for storing those in the database.

What was cool was that it was vanilla JavaScript and not jQuery. I was able to use:

var elems = document.getElementsByClassName('usr-quote');
for (var i=0; i < elems.length; i++) {
elems[i].appendChild(document.createTextNode(txt[(var2-var1)%txt.length])); };

Decent. Some of that was already there but I adjusted it a little. The big issue is that inside of that script they add a call when the DOM is loaded. This would be fine but it is the same code with no checks to make sure those functions or variables do not already exist. Essentially using the global scope for it all.

[Enter silent scream here]

As for my developer brain, I have not made much progress. I need to gather up some more links so I can read more. I see some on my Twitter timeline from time to time but I forget to either bookmark them or read them. I need to get better at that.

All I know is that I’m going to be debating on updating my laptop to use Bionic Beaver for the next week or two.

Baby steps

For the last year, I’ve learned some JavaScript and a few more things about PHP. That’s great. The only thing is that I don’t feel like I have expanded that skill set just yet. I think a lot of that is because I never really had a personal project to test things out.

I began building my random theme – I think – last week. Getting things to build was pretty cool and a little frustrating only because I didn’t really think about what I was needing. And by that I mean, I didn’t think about what tools are required.

The simplest was knowing about the command line. Yes, it sounds strange but that is a great thing to know even if it means just basic things like getting the current folder you are in or even knowing what files are in the folder helps a ton.

Things needed

The things I knew that I needed or at least I thought I would need were:

  • React
  • ReactDOM
  • Babel
  • Webpack
  • NodeJS

Super simple, right?

I thought so. What makes this a little different is that I have three operating systems now. Windows 10, OSX, and Ubuntu. A desktop and two laptops, respectively. On my desktop and OSX I use VVV, but on Ubuntu, I chose to scrap that and use Docker. A bit more to the point Docker Compose.

I began reading about how it works and what is used so I can setup a local environment for developing WordPress things. In my case a theme. What’s cool is that they have a quick guide for WordPress and there are a few others who have their own setup process as well.

Yes, I did spend quite a bit of time looking at many docker-compose files to get a better idea of how it all works. I’ll have to share my experience next week as I experiment a little more and get a better understanding of it. The reason is because I know on Twitter I came across this:

Quite some time ago but this was something I still wanted to look at much closer so that others could benefit as well. In particular those who want to contribute to the project and could already be using Docker.

Tying things together

It does seem like I went on a bit of a tangent but bare with me there is a reason for that. You see, on my Ubuntu laptop, I don’t currently have a local environment setup so that means I can’t exactly work on my theme if I even tried.

Yet.

This is the reason I said, the things I thought I would need because I obviously forgot to include my local environment. I know some of you are saying just do it on a live site! I wish I could but I really don’t want to deal with maintaining things or dealing with configurations and whatnots.

Yet, I sort of am dealing with configuration because Docker Compose is a neat little tool to get up and running. I think my favorite part is just learning why things break.

Minor weekly highlights

With that being said, there are a few things that helped me out this week when it came to reading. A few articles and a few repos that helped shed some light on how things work when using Docker Compose. The last one is actually a repo by Justin Tadlock and it’s a modified version from a tutorial I wrote a long time ago:

Hopefully this coming week I learn more and can share this experience along the way.

Weekly updates again

Okay, I haven’t done weekly updates in quite some time. I was somewhat consistent for a while but then it just kind of stopped for some time. Things happen, right?

This time around, I am thinking of doing my updates on Friday nights. This way I can at least be somewhat consistent and plan ahead for the end of the week.

I think the biggest reason I want to do this is to see my progress but also record it. Having it on this site makes perfect sense because there are a few things I want to do.

  • Understand ReactJS better
  • Build a ReactJS theme, plugin, and or admin page
  • Draw more
  • Use Illustrator more
  • Read more
  • Blog more

Almost sounds like a lot but I know I’m capable of doing those things.

Today I began working on a random theme that will use ReactJS and ran into a few hurdles getting the JavaScript to compile properly. I was lucky to read this article to get a better understanding on how to get things working.

It was cool to see the Component I had created get rendered on the browser, granted it was a super simple thing but still cool nonetheless. I think the one thing I would like to focus on is getting a decent navigation going or even getting archives to show right. I know I saw an issue with both not being able to fully play nice with WordPress.

All I know is that I’m looking forward to breaking my site along the way.

Yes, I’ll be trying to use the theme on this site once it gets more fine-tuned.

Learning Git

How do I start start this off? I’ve been using Git for several years. I actually had to look to see when I opened my GitHub account. I opened the account in 2012 just a few months after I began contributing to the WordPress forums.

When I first began using WordPress I had no prior experience with any version control system. I honestly don’t remember who it was that got me to think about using one. I just remember it was a WordCamp talk I saw about theme development. If I ever recall, I’ll update this to reflect that.

There are still things I’m not familiar with but I did realize the other day that I do know quite a bit. It does amaze me when I do see how much I have learned over the years.

The reason I say this is because for the last several days I’ve been sort of contemplating on making a few slides, My local WordPress meetup is filled with people who are of varying degrees of knowledge when it comes to not only WordPress but also development. I know there are some who would love to learn a bit more and expand their skill set. It’s also because I know that if I do a talk it will force me to read more about how to use Git and other tools as well.

For me, learning Git is an ongoing thing. Every other day I tend to look up new things. The most recent one was how to create a diff file from a stash. Yeah, I know I just lost a few people with that one but it is something that was pretty cool to do, There was a reason for it. Now I can’t fully recall what that reason was.

I am still debating on whether or not I’ll make a few slides and a video to go along with it or just make a random post. Or both.

I guess I’ll just have to wait and see how I really feel about it.

Random issues

The other day I encountered something that was fun to solve. It was also a little frustrating because I couldn’t completely replicate on my local install. It had to do with using a mobile device and using a WebView. I am not an app developer but I do want to learn about that process. Maybe one day I’ll explore a little more on how to build an app.

It dealt with JavaScript a little bit. It was great because I was able to apply things I had learned on troubleshooting some Facebook related issues. The harder part was actually getting it to work on other apps as well. The issue was a browser check. It may sound simple for some and a pain for others. This was because in-app browsers can be a little different based on device. Android is not exactly the same as iOS, and they are not the same as Windows. Yes, there are people who actually use those type of phones.

The issue was only on iOS devices. I naturally searched for something that would help me find my answer. In our company repo, I saw a few commits that somewhat helped me figure out where things were going wrong. There was a comment that also helped me solve this. It was fixed and things worked again.

Or so I thought.

You see the fix worked but then I had introduced a small issue. It was adding a class to the body that should not have been. So, I dug a little deeper and realized what I had done wrong.

What’s cool is that I already knew about this but had forgotten to actually do this. I wasn’t checking if a property existed. You see, when I had submitted my fix I was simply using something like:

 if (!window.object.property) { // do things here } 

While that is great, it did not take into account if that property didn’t exist. What I really should have done was:

 if ("property" in window.object.property === false) { // do things here } 

Such a simple mistake to make. It happens.

I learned from it.

The object I was using was the navigator object. The property I was trying to check for was the standalone property. This is a property that only iOS devices have so when it was running the first snippet it was giving an undefined but because it was using the ! it was really saying it was trueso it was actually executing the code inside of that when it should not have.

My Vim experiment

For the last couple of weeks – I lost track honestly – I have been using Vim as my editor. I do this when I’m not working. I don’t want it get in the way. So, I’ve spent quite a bit of time reading the docs. Like reading as much of the docs as I possibly can without going insane.

It’s been really neat to see and learn about how much can actually be done within Vim. There are, of course, some limits to what can be done – then again that’s pretty true for just about any text editor.

The thing to keep in mind is that I really don’t have a lot of experience with many text editors. Over the years I have looked at, and used, NotePad++, Atom, Sublime Text, Coda, Brackets, and dare I say DreamWeaver. For a long time I did consider trying to use GoLive but never got a chance to really see how that all worked. I did try PHPStorm but never did fully get behind using it since I had to really think about having to learn new keyboard shortcuts

Yeah, I am not a fan of that.

That is only because I am a bit of a creature of habit when it comes to my development experience. It sounds strange to say that. Okay, writing it out but you get the idea.

I’ve come to like editing files on Vim because it makes me think a little different when it comes to editing and typing. It’s not always standard, control and z, control this or that, or any random combination of clacking that some of us are used to.One thing that did get my attention was actually repeating things. For example, if I add seven spaces to a line, typically I would select, copy then paste and keep pasting until I wanted. In vim I can type out far less because using the.makes it so much faster to repeat the last action.

I’m sure there are a lot of other things I still haven’t learned but I’m looking forward to reading and doing many of them. I mean I did manage to get NerdTree working on my first try so that has to say something right?