WordCamp NYC

I’m Attending WordCamp NYC – August 2-3, 2014
I’m planning on going to WordCamp NYC this weekend, barring any unforeseen circumstances. I’m looking forward to it, since I haven’t been to anything like this since Drupal Camp in 2012. The schedule looks pretty interesting; I should be able to learn some stuff.

WordCamp won’t really make up for missing San Diego this year, but hey, it should be fun!

WordPress 3 Plugin Development Essentials

In my continuing quest to pick up some useful WordPress skills, I just finished reading WordPress 3 Plugin Development Essentials by Brian Bondari & Everett Griffiths.

This book covers all the basics you’d need to develop a plugin, from setting up a local dev environment, to pushing code to the WordPress.org plugin directory.

This is definitely an overview book, covering a bunch of stuff without trying to be exhaustive about any particular thing. There is some coverage of necessary PHP and JavaScript topics, though this wouldn’t be a good book for someone with absolutely no background in PHP or JavaScript. The coverage of the WordPress API in general is sufficient to cover the basics, and to point you in the right direction on the topics that it doesn’t cover.

The book was published in 2011, and is somewhat out of date. For example, there’s a whole chapter on using Subversion, which is still useful in some circumstances, but I think most people would be using git for their day-to-day work at this point. And the first example plugin is built around Digg’s API, from the previous version of Digg (before it was re-launched in 2012), so it doesn’t work anymore. (It’s still a useful example to read through, but you wouldn’t be able to make it work.) I’m not entirely sure, but I’m pretty sure that all the core WordPress stuff that’s covered is still recent enough to be useful.

The heart of the book walks through a number of sample plugins, devoting a chapter to each. The author builds each plugin up a little at a time, explaining what he’s doing, before going on to the next part. In general, he builds things up in such a way that the plugin is functional at each stage, so you can run and debug your code as you go. This is a good approach, especially for less experienced developers.

For my own purposes, I didn’t bother actually working through the examples, as I found the explanations clear enough, and I know enough about web development that I didn’t feel like I needed to. And I skimmed over a lot of the material that was either out of date (e.g. the Subversion stuff) or that I already know (e.g. PHP and JavaScript basics).

If there were an updated version of this book available, I’d recommend it to anyone looking to get started with WordPress plugin development. As it stands, though, I’d really only recommend it if you don’t mind skipping over the stuff that’s out of date. If you can get the ebook version when Packt is having a sale, it’s worth picking up.

Code Complete

Jon Bentley describes a case in which a thousand-line program spent 80 percent of its time in a five-line square-root routine. By tripling the speed of the square-root routine he doubled the speed of the program.
Bentley also reports the case of a team that discovered that half an operating system’s time was spent in a small loop. They rewrote the loop in microcode and made the loop 10 times faster, but it didn’t change the system’s performance — they had rewritten the system’s idle loop.

via Code Complete, First Edition.

Project Euler is (almost) back

I posted about Project Euler being down a few days ago. It’s back up, but only as a static site. So you can read the problems, but there’s no access to the functionality for checking solutions, or getting into the solution forums, or anything like that. There’s a thread on reddit about this, apparently created by one of the Euler admins. It does sound like they are going to get full functionality back up and running at some point, though they don’t seem at all sure about when that will be.

I’m actually not working on any Euler problems right now, but I had intended on getting back into it at some point. Project Euler is such a great resource, I really hope they can get it back up and running soon!

WordPress 3 Plugin Development Essentials

I recently started reading WordPress 3 Plugin Development Essentials. While I haven’t gotten far enough into it to post a review, there is one great quote in the first chapter I wanted to share:

Opening up an existing WordPress plugin is a bit like going into a public restroom: it may be perfectly clean and hygienic, or it may be a rank and apoplectic mess of functions, logic, and HTML. Just be prepared.

I think I’m going to like this book. 🙂

Project Euler is offline

I was surprised and disappointed to see that Project Euler was offline, as of yesterday. The message they’ve posted on the home page makes it sound fairly serious, and it doesn’t sound like they’re 100% sure they’re going to be able to bring it back up any time soon.

I can’t understand why anyone would hack into something like Project Euler. It’s free, so there’s no money involved, and no credit card numbers to steal. It’s not political, so there’s absolutely no ideological reason to want to bring them down. And it’s not popular enough to the point where a hacker would do it just for the media attention.

I guess there might be some value in their password database, but I think most of their users would be internet-savvy enough that they wouldn’t likely be using the same password across multiple accounts. And if that’s what they were after, there must be better targets for that than Euler.

Their forum site is still up, and there’s some discussion about the problem here, but no information from the admins as of yet. And there’s a thread on reddit talking about it, which includes links to some other interesting programming puzzle sites.

Beginning COBOL for Programmers

Holy cow, somebody actually published a new book on COBOL this year. I haven’t touched COBOL in years, and I don’t plan on touching it again any time soon. But I guess I shouldn’t laugh too much at the idea that COBOL skills are still relevant.

Git cheat sheets

I’ve been a big fan of Mercurial for several years now, and, all other things being equal, I’d likely use it for all of my version control needs for the foreseeable future. But, in the real world, git has gotten a lot more traction than hg. Support for git is integrated into XCode, Xamarin Studio, and newer versions of Visual Studio. And the git command-line tool is available on my 1&1 account, but hg isn’t. So I’m putting a little effort into learning git. I’ve done enough with git to be able to take care of the basics, especially if I’m using a GUI, but I can never quite remember all the ins and outs of the command-line. So I went looking for a good PDF cheat sheet I could print out and keep handy.

I found two good ones. Here’s one from Atlassian, and another from Github.

I’m thinking about putting my WordPress directory on 1&1 under git, so I can pull down a local copy with ease, and roll back questionable updates, and stuff like that. So that’s one more little project related to the blog. Hey, if it helps me learn my way around the git command-line, that can’t be a bad thing, right?

 

Learning F#

I’ve been curious about F# for quite some time, and I recently decided to pick up a few books on it, and see if I could learn it. More generally, I wanted to learn more about functional programming. I thought about learning something like Haskell or Scala, but F# seemed like a good choice. I already know a good bit about the .NET Framework, and the CLR, so I wouldn’t be starting entirely from scratch, and I could stick with tools I already know (Visual Studio).

The three books I picked up are F# for C# Developers, Book of F#, and Programming F# 3.0.I bought them all from as DRM-free e-books from O’Reilly. (This was right before O’Reilly lost the license to sell Microsoft Press books, so the “F# for C#” book would no longer be available from them, if you were looking for it.) I haven’t started the “Programming F#” book yet, so I can’t say anything about it. But I have read a few chapters from each of the other two books.

“F# for C# Developers” is published by Microsoft Press. It’s reasonably well-written, but I haven’t really found it to be particularly engaging or interesting. Of the chapters I’ve read thus far, I’d say that it lives up to its name, in that it is oriented to folks with a good grounding in typical .NET development. I think it would make for a good reference book to keep at my desk, if I was doing some serious F# development at work, and needed to remember the difference between :> and :?>, for instance.

Given that I didn’t feel like I was really learning functional programming from that book, I decided to put it down and start reading “Book of F#”. For my purposes, this is turning out to be a better book. I’ve read the first four chapters so far, and I’m finding that I like the tone of it (including Doctor Who references!), and the general style. I’m finding the example code to be a bit more understandable and interesting than in the other book.

I’ve experimented a bit with re-doing some of the Project Euler problems in F#, as I’ve mentioned before, and I’ve found that to be a good exercise too. Oh, and I’ve solved through to problem 31 there, so I’ve managed to make some overall progress on Project Euler.