I love wholesome memes, and couldn’t pass up the chance to extoll the virtues of Buddhist practice and community to finally defeat addiction:
Watch the video of my talk!
Here’s the slides embedded from Slideshare.
GIF by me and Giphy, thought it already existed but couldn’t find it.
These are the slides for my talk at WordCamp Montreal 2015, about integrating maps and geolocation into your WordPress site with the Geo Mashup plugin. There should be video eventually and I’ll add it here :)
Full talk description
WordPress has built-in support for storing location information on posts, but no real way to make use of it. The Geo Mashup plugin enables deep, powerful geolocation in WordPress, letting you easily add geolocations (coordinates) to almost any content type. It also displays locations on maps you can embed in your theme, posts or widgets, with a dizzying array of options for what to show and how to display it.
This talk will start with the default geolocation system in WordPress and how Geo Mashup integrates with it. We’ll then cover the basics of setup and adding locations on posts, then the different map types and situations where you’d use them. We’ll finish with some dev considerations for displaying maps as elegantly as possible.
What is Solarized?
Solarized is a programming color “palette” designed by Ethan Schnoonover for use when writing syntax-highlited code. It’s based on color wheel and lightness relationships and it’s all sciencey and stuff, but the essence is that all the colors look good together and have good contrast, so you can use the different colors for different parts of your code (functions, variables, strings etc.) and no matter how you organize it the result should be easy on the eyes. It also has both a “dark” and “light” mode with different background/foreground colors, but most of the colors (red, green, magenta) work the same for both, which is cool.
Here’s a color reference I put together showing the various colors in Solarized Dark along with their RGB and hex codes. It was very useful to have around while working on the NetBeans theme (the Solarized site is strangely lacking a similar reference).
My Solarized Dark theme for NetBeans+PHP
As soon as I heard about Solarized I wanted to try it out with NetBeans, my IDE of choice for PHP/WordPress coding. I’ve spent many an hour tweaking my color schemes in NetBeans (and Smultron, my old text editor before that) and choosing the color relationships was always the hardest part, so having classy choices all laid out for me was very appealing.
The good news was that there is already a NetBeans port of the Solarized colors that worked as advertised. The problem was that IMHO it wasn’t particularly well executed. NetBeans has a lot of options in the color scheme settings, but they are also extremely confusing and often flat-out misleading, so I don’t blame the original author for not getting it perfect. He also may not have been looking at PHP code, in which case it makes sense that the PHP-specific color settings weren’t well organized. Lastly there’s a huge element of personal taste, even within the process of implementing a preset color theme like Solarized, so I recognize that the result is really just my personal opinion of what NetBeans+PHP+Solarized should look like.
I like to think it balances the need to have different parts of the code be different colors and the limitations of doing so using the NetBeans color settings. It should work just as well with procedural and object-oriented code.
One feature I added that isn’t in the original Solarized for Netbeans colors is SVN support. I had to invent them, but my theme has appropriate red, green and blue background colors when viewing a SVN DIFF.
Installing my theme in your NetBeans
Since NetBeans has a configuration import/export system you can install these colors really easily.
- Download the .zip file linked below (don’t unzip it, NetBeans wants it as .zip).
- Open NetBeans and summon the Preferences window (Options on Windows).
- Go to the Fonts & Colors Preference tab.
- Click Import at the bottom of the window.
- Click Browse and find the .zip file, click OK.
Download netbeans-colors-solarized-dark-jer.zip »
Once you have the theme installed it should show up in the Fonts & Colors preferences as part of the Profile pulldown menu, where it’s identified as Netbeans_Solarized_Dark-jer.
Since I started using this I pretty much never feel the need to use a “light” theme so I haven’t tweaked the Solarized Light colors at all. Sorry if that’s what you would have preferred ;)
Anyway, hope some of you find this useful! I plan to someday get some of my changes added to the official GitHub repo, but wanted to get this out before my Code Faster and Smarter PHP with IDEs Like NetBeans talk tomorrow at WordCamp Montreal.
It’s not exactly a thrill ride, coming in at 51 minutes, but here’s the full audio+slides video of my presentation about DRY CSS, my “simple yet powerful CSS architecture that avoids duplication and increases design consistency by grouping shared properties together rather than redefining them over and over”. Sorry there’s not footage of my pretty face, I recorded this using Screen Capture in QuickTime and Voice Memos on my iPhone (using the earbud mic).
For the impatient, you can also go through just the slides on slideshare.
Here’s the video with slides+audio of talk in case you prefer that. It’s 51min
This is an idea/talk that has literally been years in the making. Ever since I used this “DRY CSS” system for the Global Voices redesign I’ve been meaning to do the background research and lay it all out clearly like this. To me the core principle is so simple and standards-based that I have trouble believing it’s not already a thing, but I can’t find anyone else promoting it so here you go:
Embed should be above, here’s a direct link to the slideshare page: DRY CSS – A don’t-repeat-yourself methodology for creating efficient, unified and Scalable stylesheets »
Or if you prefer you can download the slides as a PDF »
Let me know what you think! Am I crazy? Why aren’t we already doing it this way?
This post is about Munin and the custom theme I built for it, Raven.
What is Munin and why am I bothering with it?
Munin is a program you install on servers to track their resource usage and application performance on a minute-by-minute basis and present you with graphs giving tons of detail about it’s status over time (each report can be viewed for daily, weekly, etc.) It has lots of core and community-built plugins to track different server applications and different aspects of a server’s health.
The basic idea is that you install a ‘node’ on each server you want to keep track of, then one ‘master’ that queries the nodes and generates the graphs for you. I’ve had it recommended to me by pro sysadmins a few times in the past but was intimidated by the complexity of installation and the inscrutability of the resulting graphs, which depend on you having pre-existing knowledge of the command-line tools who’s output they aggregate. Oh, my iostat is up… um… what do I do about that?
The best guide to understanding and installing Munin I found was this great set of articles on the Slicehost blog. They are intended for Slicehost customers, but seem to apply pretty well to anyone using the Linux distrubutions they cover.
The problem with Munin and it’s Theme ecosystem
So I got it running and am trying to figure out how to read the information it presents but there’s a problem: It’s woefully, sinfully and abysmally ugly. The web pages output by munin are not just composed on 90’s style tables, they are ugly tables, with tiny text and wasteful spacing.
FWIW I don’t even know how to refer to this. The files themselves are called ‘templates’ in various places on the Munin site, but IMHO the package as a whole should be called a “theme”, at least that’s how we do things in WordPress land. I tried to use both in this post so people find this post, but I’ll call it ‘theme’ from now on.
My Munin Theme: Raven
Screenshot of Raven. Click to enlarge. Compare with screenshot of alt-default theme.
Features of Raven compared to the default theme:
- Larger text all over to actually use up all the empty space created by the unavoidably-large graph images.
- Reduced unneeded spacing and <hr> tags that just added noise.
- Calm light-grey colors and rounded corners to soothe your mind while you toil over server performance.
- Readme/installation instructions in the .zip file.
Download Raven theme
If I get good feedback about this I’ll post it on the official Munin Wiki, but for now you can grab the zip file above. Please take a look at the contents and read the README-INSTRUCTIONS.txt file before installing the theme.
The README-INSTRUCTIONS.txt file contains all the information you need to use Raven, including detailed instructions with background information about the locations you need to upload files to. Here is the summarized instructions so you can get a sense of how simple installation is:
- Upload the “templates_raven” directory from this zip file into your Munin config directory (i.e. same directory that munin.conf is in, probably /etc/munin/)
- Upload the ‘raven-htmldir-files’ directory from this zip file into your Munin HTML directory (where the public HTML is served from).
- Edit your “munin.conf” file on the master and change the “tmpldir” property to reference the new “templates_raven” directory in your Munin config directory instead of the default “templates”.
- Wait 5 minutes for the Munin master to refresh itself and reload.
Feedback? Thanks? Bugfixes?
Obviously this is my first attempt at a Munin theme and there is not a lot of other examples to emulate, so I may have done something horribly wrong. If you have questions or comments please use the comment form below to let me know about them.
I will try to get back to you ASAP but be warned: I am not going to support your Munin problems for you. I am sharing this theme to give back to the community, but if your problem is complicated I may not be able to help.
Thanks in advance to anyone brave enough to try out the theme and leave feedback!
Prompted by Cardboard Love.
WARNING: Intense discussion of the open-source design of the WordPress website software lies ahead. I will literally discuss shades of grey. People uninterested in WordPress and its future should probably learn more about snuggies instead.
I updated my WordPress SVN Trunk installation today and noticed a huge change to the admin screens that had just been committed. The header and footer of the admin section had been switched from basically black to a very light grey color. This change was committed as a work in progress, so people would see it and work towards a final solution.
Fig 1. Old admin header color on top, current SVN version below.
Overall I support this change and think it looks better, but the exact shade of grey in the background didn’t match the gradients in similar UI elements (the dashboard sections and screen options buttons) so I worked out a different light-grey graphic to use as a background that would match. Here is a screenshot of how it should look if this light grey is used in the final WP 3.0 release, I think it is pretty solid and shouldn’t make anyone cry.
Fig 2. WP-Admin with darker but still light-grey heading and footer. Pretty okay.
I remembered a conversation on the WP UI dev blog where another middle-grey option was proposed but didn’t get a lot of attention. I really liked the darker grey version in JohnONolan‘s original mockup so I worked out a full page screenshot using the darker shade of grey that I thought worked better and added them to the trac ticket about the header change.
Here’s the one I think would work the best, dark grey to match the active heading in the sidebar (in this case the “Dashboard” section heading).
Fig 3. Nice dark WordPress Admin screen, how it should be.
Here is one giant image with both of them so you can compare. Instead of images like this I like to open two versions in seperate tabs in my browser than jump back and forth to decide which I prefer.
Fig 4. Side-by-Side comparison of light and dark grey proposals for admin header and footer.
I’m hoping the dark one can get implemented because it has a lot of nice features that the lighter version lacks:
- It is not a big change from the old version, so people will be inherently less upset about it.
- It brackets the whole UI nicely and preserves the high-contrast from the old design.
- It avoids a page where 90% of the chrome matches each other pefectly. I think the dark grey is important to keeping the look neat, and having only one element in the page with that color (the active sidebar heading) make it look unbalanced.
Feedback welcome, what do you think? If you want to support/flame me the trac ticket about it is probably the best place, so that your input affects the final decision.