Author Archives: conner_bw

Ubuntu 13.04

Ubuntu 13.04 (Raring Ringtail) is now available.

Thirteen is my favourite number. April is my favourite month. I am stoked on this release for superstitious reasons alone!

Seriously though 13.04 is 12.10 done right. A quality build. I’m very happy with this release. I’ve been running it since the beta was announced ~3 weeks ago. Best, Unity Based Ubuntu, Ever.

PS: Don’t forget to run:

sudo apt-get remove unity-lens-shopping

The amazon debacle is still not adequately resolved. Running that command at the terminal is good enough for now. Canonical is actively working on a reasonable compromise. I’ll give them the benefit of the doubt and re-install when I see it. I’m coming around…

An aside.

System Settings -> Appearance -> I set my wallpaper to “Changes throughout the day.” It’s a feature that cycles through the images in /usr/share/backgrounds/. This directory contains wallpapers that get updated every Ubuntu release.

My 3-year-old daughter who is currently potty training saw this one pop-up:

Kids Say the Darndest Things is an American comedy series hosted by Bill Cosby that aired on CBS as a special on February 6, 1995

Kids say the darndest things.

“Regarde papa, caca!”

I laughed. A picture forever ruined? Oh well.

Investing In Index Funds, Hedging Against A Post-Apocalyptic Retirement

My fellow Canadians, there is a spectre is haunting Europe…

Synopsis

Investing in index funds is as close to “investing in everything” as possible. That is, you don’t pick and choose investments. Instead, you literally try to invest in everything at the same time.

Index funds outperform 80% of actively managed funds over the long term. That means for most people passively “investing in everything” is better than actively trying to do anything.

Finally, if “everything” collapses then your money is worthless. If “everything” collapses then we either live in a socialist paradise (horray!) or a socialist nightmare (booo!) and society as we know it has rebooted post-apocalypse style. If “everything” collapses then your investment plans are finished no matter what you had going on.

Go for broke.

Recommended Reading

Seriously read those books. They are much more sensible than my crazy talk and the practical “do somethings” end up the same.

Practical Do Something

Start with ING Streetwise Funds. Later, when you have significant assets, move your investments into (another) recommended index fund.

The reason you start with ING is because the other options are currently not cost effective unless you have a hefty account minimum. ING is not the cheapest but there are no account minimums, you don’t need to work with a discount brokerage, you don’t pay annual account fees, and you don’t need to rebalance your portfolio. A decent choice for novice investors with small portfolios.

Bonus Do Something Else

The income tax you save by investing in an RRSP today will be collected in the future at a higher post-apocalyptic rate. Think about that. Tax free savings accounts are also for retirement. Do both.

If you have kids then get them a RESP at a credit union (not a bank). The government contributes to the RESP significantly. The credit union keeps the money socially responsible.

Don’t keep more than 100,000 dollars in your bank account. See Cyprus.

See you in the future dads. (and future moms too)

Howto Setup PhpStorm to Work on WordPress Plugins (and Themes)

PhpStorm is the best PHP IDE available and you should use it. If you don’t agree stop reading. Did you stop reading? No? Good, then you aren’t a dumbass let’s get started.

This tutorial explains how to setup PhpStorm to work on WordPress Plugins (and Themes).

Target audience: Intermediate to advanced.

This tutorial will not show you how to use PhpStorm. I assume you are already using PhpStorm or want to learn and will do so on your own. This tutorial will not show you how to develop for WordPress. Yes, WP sucks and is ass-backwards PHP. Or yes, WP is amazing and powers ~20% of the web. For whatever reasons, you are here for this info.

Benefits of this type setup:

  • Automatic code completion, code navigation, PhpStorm’s kitchen sink.
  • Ability to mix version control systems (Git, SVN, Perforce, CVS, …)  and sources (GitHub, SourceForge, Codebase, core.svn.wordpress.org, … )
  • Work on multiple plugins (and themes) at the same time for the same project.

I’m a developer at PressBooks.com. This is my project setup:

wordpress-and-phpstorm-project

This structure makes up the bulk of PressBooks dot com, that is:

  • WordPress 3.5.x (Subversion)
  • PressBooks (GitHub)
  • The front page of PressBooks dot com (a private theme, hosted at Codebase)
  • Internal stats dashboard (a private plugin, hosted at Codebase)

Prerequisites

  • LAMP on localhost or LAMP on VM with mapped folders. (If this doesn’t mean anything to you then stop reading and come back when it does, young padawan)
  • PhpStorm -> Quick Start -> Open Directory
  • PhpStorm -> File -> Settings

Directories

wordpress-and-phpstorm-directories-1

Under Project Settings, select Directories. Add each content root that makes up your WordPress project.

Deployment

wordpress-and-phpstorm-deployment-1

Under Project Settings, select Deployment. Click the green +. Create a deployment profile of type “Local or Mounted Folder”. I named mine: TextoPress. Rename accordingly. Remember this renaming for the Install section that will come later. Select the Connection tab. Change “Folder” to: the root path of your WordPress site. Change “Web server root URL” to: the root URL of your WordPress site.

wordpress-and-phpstorm-deployment-2Select the Mappings tab.

  • Map WordPress to: /
  • Map Plugins to: wp-content/plugins/__PLUGIN_NAME__
  • Map Themes to : wp-content/themes/__THEME_NAME__

Replace __PLUGIN_NAME__ and __THEME_NAME__ accordingly. Click on the above screenshot and squint for more details.

wordpress-and-phpstorm-deployment-3Under Project Settings, select Deployment -> Options. Change “Upload changed files automatically to the default server” to: Always. Change “Upload external changes” to: true.

Version Control

wordpress-and-phpstorm-version-control-1

Under Project Settings, select Version Control. Add your VCS repositories.

Install

Apply changes. Right click on your project. Select “Upload to TextoPress” (Don’t see TextoPress? Exactly. Re-read the Deployment section above…)  Navigate to your web server root URL. Install WordPress using the Famous 5-Minute Install. Eventually:

wordpress-and-phpstorm-localhost-url

Remember:

  • You are editing a copy of the code, not the deployed code. If something seems weird always start by doing “Upload to TextoPress” which from here on in will be known as “Did you plug it in?”
  • You can add and remove plugins (and themes) as you feel like. Rinse and repeat the instructions above until you get the hang of it.

Code is poetry. Bad, wince-worthy poetry.

sudo apt-get remove unity-lens-shopping

Ubuntu 12.10 is out today. Get it here.

The first thing you should do after installing “Quantal Quetzal” is go to the terminal and run this command:

sudo apt-get remove unity-lens-shopping

The second thing you should do is go to their donation page and pitch-in $15 to alleviate any latent catholic guilt you might have from running the above instruction.

Removing `unity-lens-shopping` sends the necessary message that they really botched their attempt to steamroll this change into the distribution. I’m not against a monetization strategy with Amazon as a partner. Heck, I’m not even against remote searches. I am, however, totally against remote searches in the home lens; that is just a terrible idea.

I think Ubuntu is going in the right direction. As an OSX user from 2003 until 12.04 LTS, I like Unity. Valve is porting Steam to the platform which could bring patches that Renoise, my music sequencer of choice, would benefit from. I work with it Ubuntu every day and I sincerely enjoy the experience, except for one thing: remote searches in the Dash Home have got to go.

I thought the slap chop guy was going to be forever.

 

Vegan Natto With Rice, Vegan Natto Spaghetti

Natto is basically fermented soybeans. It’s a traditional Japanese staple that’s been around for over 1000 years. It has a very powerful and pungent taste. It is widely known as the “foreigner’s most hated food” by the japanese but every gaijin faced vegan I’ve ever met loves this stuff.

Normally, natto comes in boxes that include mustard and bonito sauce. If you’re vegan don’t use the bonito sauce because it’s made with fish. Instead, replace it with soy sauce.

The most popular way to prepare natto is:

Natto With Rice (1 Serving)

  1. Pour the mustard packet and a teaspoon of soy sauce into the natto container.
  2. Stir with chopsticks for about 30-60 seconds. Do not mash.
  3. If green onions are available, chop them and mix them in.
  4. Put the natto on top of steamed rice.
  5. Eat.

Another of my favourite ways to prepare natto is:

Natto Spaghetti (2 Servings)

Ingredients:

1 onion
2 cloves of garlic
3 tablespoons olive oil
225 grams spaghetti
2 packages natto
1 teaspoon salt
1/2 teaspoon black pepper
1 Teaspoon soy sauce
1 chili pepper (optional)

Directions:

Prepare the natto as described in “natto with rice” but without the rice.

  1. Chop garlic and slice onions into thin strips.
  2. In a pan, sauté olive oil, salt and pepper, chili and garlic at low heat.
  3. Next, bring the heat to medium, add onion, sauté and put aside.
  4. Meanwhile, prepare the spaghetti as directed on the package.
  5. When the spaghetti is ready, add two tablespoons of the water from the spaghetti into the onion sauté.
  6. Season onion mixture with salt and pepper to taste.
  7. Drain the pasta, mix with the onion mixture.
  8. Serve spaghetti in heated plates, put the natto on top.

Bonus: garnish the spaghetti with chopped green onions or green herbs like chives/parsley.

Enjoy.