Tag Archives: programming

One of my favorite pastimes, and luckily something I get to do a lot in my field of study and work. This tag usually flags the post as nerdy. Sorry readers.

In need of a project…

I’ve been thinking over and over about joining some sort of open source project. But my problems (among many others) are:

  • I’m nervous about joining an existing project and not cutting it.
  • I don’t have a ton of time I can commit to a busy, fast-moving project.
  • I kind of like the idea of doing something completely from the ground up. (Ok, not completely‚ÄĒjust doing something my way.

I’ve gravitated toward WordPress before because I know PHP, HTML, JavaScript, and CSS pretty well. But I decided it wasn’t for me. The Ghost project seems neat, but I think they have different views about blogging than I do. I mean, I like most of the interface well enough, but I don’t really want a split screen. I want to type in just Markdown, preview on the fly, then maybe have split screen to do final edits if need be. But really, the whole point of Markdown is to just write and not worry about HTML. With Ghost, I’m constantly looking back and forth between the two views. Plus, I still don’t have spell check. ūüôĀ

So I think I might start building my own blogging platform. From the ground up. Just because. It’s not going to be better, it will just be mine.

Fighting Fire…

I learned something very disappointing today. I learned that the Amazon AppStore is nowhere near the Google Play app store. And that it isn’t easy, maybe not even possible, to put the Google Play store on a Kindle Fire. And there aren’t Google Apps on Amazon’s AppStore.

And the worst part of all, my favorite app, JuiceSSH isn’t available on the Amazon AppStore. I was really hoping that I could use the tablet for more than just movies and games. Not that I have any lack of devices. It’s just nice to be able to do as much as possible with the smaller devices.

But if you want to watch movies and play Candy Crush, then the Fire can do it.

Frustration just being secure…

Working at a company that makes a third of the world’s computer memory, you would think that I would be working with the latest technologies every day. Well, that’s not really the case. I deal mainly with software, developing and maintaining the stuff. And while the hardware under my desk might be top notch (i7 quad-core with 24 GB of RAM), the software running on it is probably 10 years old.

In order to get Python 2.7, I had to compile it myself. I also compiled Git. We have a NFS mounted home directory, so it’s available on all Linux boxes on the network. But that meant that I had to compile for both i686 and x64_86. Oh, and I can’t get root access on my box or get something better like Ubuntu 14.04.

Well, in this latest round, I’m trying to install some Ruby, Rails, and Node.js, along with the related packages. Well, everything was going great until I started the main install, and I got a weird error trying to download from Github over HTTPS. It wasn’t the proxy (I already had that setup correctly). I dug in and found two problems:

  1. The certificates on my machine were out of date, so I couldn’t download from some sites.
  2. The OpenSSL on my machine was so old, it didn’t support SHA-256 (which, funny enough, all new certificates will probably have, as most certificate authorities are phasing out SHA-1).
    So I tried to go down the road of compiling OpenSSL, Curl, and Git with support for the newer digest, as well as update the CA certificates. Oh, the nightmare this has been. Everything seems to go fine, but then Git just doesn’t work over HTTP/HTTPS. No error message — it just stops.

And all of this is to get OpenProject running on Linux because our sys admin gave me a old Windows box with a Core Duo processor to install OpenProject on, and now OpenProject doesn’t support Windows at all, and a Virtual Box Ubuntu server won’t run fast enough.

Anyway, that’s a long boring story. My point is: how can a technology company be so bad with software? Oh, the horror stories I could tell…

Welcome to Ghost…

Well, I did it. I successfully migrated my blog to Ghost. It was a bit of a wild ride. I’m going to jot down a few of the nerdier lessons learned, on the off-chance someone else runs into the same problems and happens upon this post.

Exporting from WordPress

Exporting the WordPress data was easy. I just used the Ghost export plugin for WordPress. I first exported all comments to Disqus, and I didn’t worry about images, since I don’t have that many and I didn’t really care if they were lost. I guess there are ways to save the images as well, but I didn’t bother. One caveat that you might also run into: tag descriptions cannot be more that 200 characters, so trim these first or you’ll be editing JSON by hand.

Installing Ghost

I chose to download from GitHub, in case I wanted to make any changes. I made my own fork as well. Anyway, that was the easy part. Just make sure you follow the right instructions (there are extra steps if you download from GitHub, in a “contributing” section). Once I did that it was a piece of cake.

The only tricky thing was that all off the post dates were way off, so I had to adjust the dates by +7 hours. Otherwise, all of my permalinks were broken. But now BYU students can still find the MRH.

Apache Reverse Proxy

I run Apache, including a few other blogs and other tools in PHP, so I needed to figure out a way to forward all https traffic to Ghost. I tried using a socket. That was a mistake. Apache’s Unix domain socket support is questionable, and documentation is nonexistant. Save yourself the pain and just use TCP/HTTP forwarding. I set Apache to redirect any HTTP traffic to mchasej.com, so I just had to worry about the SSL/HTTPS forwarding. But be sure to add the following line to your Apache conf file, or you’ll end up with endless redirect loops:

RequestHeader add X-Forwarded-Proto https

I’m sure that there’s a variable for the “https” but since this is a *:433 virtual host, it didn’t matter.

Ok, I guess that wasn’t as hard as it needed to be. Honestly, I probably spent a good 1-2 hours trying to get the socket thing to work. And before that, I spent 5-6 hours setting up SSL between my webhost and home server’s MySQL servers, as well as resyncing the slave. That was trickier than it needed to be, mostly because it left out the important detail that the CN for the requests had to be different between the CA, server, and client certificates. But now that’s finally secure. That wasn’t even something I thought of, then I stumbled upon the settings and realized that everything between my master and slave was plaintext. Oh, and tip: setup the slave certs through the CHANGE MASTER TO MASTER_SSL_CA=… command and not through the my.cnf file.

Well, I’m done with the nerdy stuff for now. I’m really excited to start using Ghost. The only thing I’m not happy with is the lack of browser spell-check support. Other than that, I’m tickled pink with this new blogging platform. My new little laptop handles it better as well.

Why can’t it be more simple…

So I looked into using Discourse for comments. Another project using Ruby (on Rails). So that’s not my favorite idea.

I’ve started to think what I would most want from a blogging platform. ¬†One thing I don’t really care about WordPress right now (any maybe it’s just this theme) is that my content seems to take a back seat to the sidebars and widgets. But this is the WordPress default theme of 2014. So…

So here’s my wishlist (in no particular order):

  1. Simple — I don’t need a lot of fluff. ¬†I don’t need Facebook integration or anything like that.
  2. Lightweight — I need something that runs a little better on my new laptop. WordPress is feeling bloated.
  3. Comments — While I don’t get a lot of comments, I think blogs need comments. Comments with moderation.
  4. Minimal — I want a minimal theme, nice crisp font. Nothing flashy.
  5. Easy — Something that I can drop on a server and not have to run 5 different languages to get it going. Apache and PHP are easy, so WordPress does have an up here.

So Ghost is most of these things. I’m not sure how easy it is. I’m working a lot with JavaScript lately, so I could probably add anything I really wanted. Plus, it might prove to become an open source project that I could actually contribute to. There are no comments, but this might just have to be the way it is for a while. I’m not even sure anyone reads my blog anymore.

So that’s what I might be doing tomorrow: taking care of a sick wife and installing Ghost.

I just want to watch Clue…

Come on Netflix! ¬†I know that when you say you’re stuck at 25% that it really means that you’re lying to me and that you’re at 0%.

Anyways, that’s not important. ¬†But it does mean that I can focus on blogging. ¬†I was hoping to do both, but this will have to do. ¬†I’m testing my new 11.6″ laptop out on WordPress. ¬†It’s not a very powerful machine, so I’ve already abandoned the visual editor. But it’s doing fine with the text editor. And I like Markdown anyway (actually, I prefer CommonMark–I’m not a fan of Gruber).

I’ve been using more and more open source tools at work. And it has peaked my interest in becoming involved in some open source communities and projects. I’ve thought about getting involved with WordPress, but it’s such a huge project. Plus, it feels like it’s getting bloated. And it’s probably overkill for my readership of one and the seldom that I write.

I started looking at Jekyll. It’s perfect, except it’s written in Ruby–I don’t like Ruby. Then I started looking at Octopress. Same problem, plus it doesn’t seem to be actively developed.

Then (just a few minutes ago), I stumbled upon Ghost…

And with just 5 minutes with their trial, I’m sold. I’ll be switching to Ghost in the near future. Ghost with Discourse for comments.

Going mechanical…

I’m geeking out over my most-recent nerd upgrade. ¬†A mechanical keyboard. ¬†And not just any mechanical keyboard, but a mechanical keyboard designed specifically for programmers.

http://codekeyboards.com/

The funny thing is that this will probably end up being at work 90+% of the time, since I don’t actually do a lot of programming at home. ¬†(But maybe that would change if I had a keyboard like this.) ¬†Anyway, my work keyboard is just a cheap generic HP keyboard that came with my PC. ¬†I swapped it out for a Microsoft Natural Keyboard for about a week before switching back. ¬†But the cheap keyboard isn’t pleasant to type on. ¬†Indeed, I would prefer my laptop keyboard to the one I have at work.

So I’m joining the keyboard cult (a term used by Jeff Atwood, co-creator of the CODE keyboard). ¬†I’m pretty excited about it. ¬†I spend 90% of my working day in from on my computer, and probably 90% of that with both hands on the keyboard. ¬†If this makes that time more enjoyable, then I’m all in. ¬†I just hope the keyboard isn’t¬†too loud. ¬†I mean, a little bit would be great, but not too much.

Currently listening to “Open Your Eyes” by Snow Patrol

Eureka, but without the nudity…

…like¬†Archimedes.

I started this a while back, and for some reason, I never finished it.  So here it is, though kinda boring.

One of the most rewarding parts of my job is solving problems with software. ¬†Usually it’s Python scripts or webpages written in PHP and Javascript. ¬†Today, it was Python. ¬†And it was a good one. ¬†Been working on it for about a week, and today I got it working. ¬†And it works perfectly (once I worked the bugs out of it). ¬†There’s still a bit of tweaking and improving to do, mostly to purge the data of human error. ¬†There’s nothing quite like the feeling of writing a couple hundred lines of code from scratch and seeing it work, gathering hundreds of megabytes of information and outputting a usable data file. ¬†I love it.

Minor discoveries…

It’s been a while since I last blogged. ¬†A month an a half to be exact. ¬†I’m not good at writing regularly. ¬†I feel like I never have anything interesting to say. ¬†I don’t have anything particularly interesting to say right now. ¬†But if I watch any more TV, I’m going to feel like the biggest loser.

Sav is gone for the week. ¬†Left me all alone to go to work and make bread and bacon. ¬†Actually, we don’t make bread or bacon, because we’re a tech company. ¬†For the sake of security and because Sav has taught me to love¬†pseudonyms, let’s just say that we make widgets. ¬†So I’m home alone this week while she’s off boating, hiking, and other types of vacationing. ¬†It will be the longest we’ve been apart. ¬†It’s the first time she’s left me home alone for more than a day. ¬†It weirded me out yesterday. ¬†It’s lonely in this empty house.

So I’ve watched TV, messed around on my server, and changed my blog theme. ¬†On the subject of the server (skip if you don’t care, it won’t hurt my feelings): ¬†I’m trying a fresh instance and see if things improve.¬†¬†I’ll probably have to upgrade to a more capable instance, but we’ll try this first. ¬†It’s much cheaper if I can keep it running on a micro instance. ¬†The problem is MySQL 5.5. ¬†It keeps crashing. ¬†I may try a script to check if MySQL is running every 30 minutes and restart it if it has crashed. ¬†It could also send me an email. ¬†That’s the next step if problems persist.

So the idea of my post today was to share a few things I’ve discovered over the last few weeks and months.

  1. Having a lawn is a pain. ¬†You have to cut it every week. ¬†Some parts of ours are dead, and it’s hard to convince them not to be. ¬†We overseeded, but I didn’t cut the ¬†grass as short as I ought, and it only helped in select areas. ¬†I’m probably going to re-overseed this fall. ¬†Then there’s weeds, bugs, watering, and more. ¬†I’m sure that after a while it won’t seem so bad though.
  2. Every IT/IS department is awful.  Especially when outsourced.
  3. Amazon Video On Demand works so much better than Netflix. ¬†If the Prime selection was just a little better, we could drop Netflix completely. ¬†My favorite part? ¬†When I rewind or fast-forward, Amazon VOD is smart enough that it doesn’t have to re-download if it’s cached. ¬†And it keeps a cache to rewind at least a minute without any delay. ¬†It’s awesome.
  4. Solarized. ¬†Probably my coolest discovery of ever. ¬†(This is another super nerdy paragraph.) ¬†I found it more or less by accident when I was trying to get my work terminal looking like the default gnome-terminal in Gnome 3 on Ubuntu. Now my terminal in Ubuntu has been solarized. ¬†My work terminal has been solarized (even Putty on my Windows machine). ¬†Vim and gvim have been solarized. ¬†My directory listings have been solarized. ¬†Even this blog will probably become a little solarized. ¬†Here’s the thing: it only took a few hours on Windows looking at PDFs (black text on white) to give me eye strain and the beginnings of a headache. ¬†But I can work all day at my computer staring at my solarized terminals and not feel a thing. ¬†It’s awesome. ¬†And it makes vim so much nicer to use. ¬†The colors make more sense (especially when using vimdiff) and are just plain pleasant. ¬†It makes everything in a terminal nice.
  5. I still like Grey’s Anatomy. ¬†Sav and I started watching it together. ¬†I wasn’t sure she’d like it, but she does. ¬†I think it’s funny. ¬†Judge me if you want, but it’s entertaining.
  6. I don’t like going to bed early. ¬†I need to, I ought to. ¬†Right now I should be sleeping. ¬†But instead, I’ll probably make some sleepy time herbal tea and drink it while not sleeping. ¬†Ironic? ¬†(That’s actually a question, because Sav often calls me out for not using “ironic” correctly.)

So that’s a few things I felt like sharing today. ¬†Really I could go on and on about Solarized. ¬†But I know that of the 5 friends that read this blog, only ~1 of them is probably going to care about it. ¬†(Try it!) ¬†But now it’s late and I need to go to bed. ¬†6:30 always comes so quickly.

Currently listening to “Cosy In The Rocket” by Psapp

Technical difficulties resolved…hopefully…

Our little (tiny really) chunk of the cloud experienced a few technical difficulties the past few weeks. ¬†Without gushing too much nerd your way, a software upgrade cause the system to run out of resources. ¬†(MySQL kept crashing.) ¬†But luckily I apparently know what I’m doing and was able to fix the problem by limiting the number of connections and server processes. ¬†Hopefully it’s fixed. ¬†It’s been working, so that’s a good sign.

I learned a few cool things about Linux the past few days.  First, I learned that with 11 characters I can use my mouse in Vim.  I learned that screen can require a password when reattaching.  And I learned that Bash is much better than tcsh.

Things at work are great. ¬†(That’s where I learned a few of these things.) ¬†I also have learned that in a¬†corporate¬†environment you don’t always get the most up-to-date software, even if it’s free software. ¬†I also learned that my work email filters out gziped tar files, even if they are simply full of vim and bash configurations to help me figure out the settings I want.

Anyway, this is a boring post.  Sorry

Currently listening to “Speak Now” by Taylor Swift