Josh (the blog)

I’ve delivered simple, clear and easy-to-use services for 20 years, for startups, scaleups and government. I write about the nerdy bits here.


@joahua

MAMP’s MySQL status red & not starting

MAMP is a good way to setup a low-maintenance dev environment for OS X in very little time, but its handling of MySQL is quite annoying.

When you suspend/sleep a computer, often when you resume MAMP has lost track of the MySQL instance it started and can no longer connect to it. Not sure if this is a problem with the MySQL build being used, but as the problem has existed since 2009, I don’t have high hopes for it being fixed anytime soon.

The quickest solution is to kill off the process it had started previously and then hit “Start Servers” again – it just takes one line on the terminal.

killall -9 mysqld

Be aware that this will kill all running MySQL processes (including those outside of MAMP’s control) – this is normally fine, as no-one actually hosts websites on OS X!

ClubsAustralia and AHA: you’re not GetUp.

ClubsAustralia and the AHA want to apply pressure to the federal government not to pass legislation restricting access to gambling. They reckon there’s support for the madness that is gambling-funded “community activities” in this country, and have setup a GetUp!-esque “message your MP” form.

Instead, use their form to send the government the OPPOSITE message!

Here’s what I said (more or less editing their message to the reverse effect):

“I am writing to say that I WHOLEHEARTEDLY SUPPORT the Government’s plan to introduce a licence to punt.

Problem gambling is an area of concern for the community and needs to be addressed by government.

A licence to punt on the pokies MAY drive problem gamblers to other forms of gambling, including online – where possible, it is, of course, important that these too are regulated appropriately – through funding community level support for problem gamblers, as well as domestic regulation (not Internet filtering). The clubs and pubs will be impacted by this legislation, of course, but the net benefit to the community stands to be tremendous.

Gambling destroys many families and imposes significant pressures on the financial security and emotional stability of individuals: within reason, this trumps the “privacy, rights and the importance of local clubs and pubs” that ClubsAustralia and the AHA so desire you to consider.”

There are other ways to contact your MPs, of course, but there’s something deeply satisfying about using tools provided by some of the largest industry lobbying groups in the country against their own purposes.

Home / End in OS X Terminal

OS X is a bit retarded, but what the rest of the world thinks Home / End should do, Mac users can achieve by pressing Shift + Home / Shift + End or Control + A / Control + E respectively. I’m talking about how to move your cursor to the beginning or end of a line, of course!

If you’re on one of those special midget keyboards (a laptop?) that lacks useful buttons like Home and End, you’re probably looking for Shift + Fn + Left / Shift + Fn + Right.

There are a bunch of ways you can remap the key bindings, but in the interests of staying sane when working on others’ machines, it’s probably worth changing your muscle memory instead of your bindings here. It’s also worth noting that Vim users can use ^ / $ for beginning / end of line respectively.

All existing apps and their data on the iPhone will be replaced with apps from this iTunes library.

Or will it?

If you’re setting up a new computer and have Authorized This Computer (Store -> Authorize This Computer) already, it seems weird that iTunes won’t let you just sync your apps from the device.

For whatever reason, you ALSO need to “Transfer Purchases from” the iPhone or iPod in question. Crazy huh? Nevertheless, it’s actually pretty straightforward.

Transfer Purchases from iPhone menu

Firefox 4 status bar

On running Firefox 4 for the first time I was shocked to mouseover a link and apparently not be able to see where I was going. Had they banished the status bar? Of course, everyone’s just playing catchup to Chrome’s UI, and its status bar isn’t really a bar at all – it just appears as and when it’s needed. Perfect.

Floating status bar in Chrome - only appears as you mouseover a link

The way it's meant to happen!

As and when typically just means “right before you click on a link”, with the whole thing triggered by mouseovers. The first page Firefox loads when you start the browser is available here – http://www.mozilla.com/en-US/firefox/4.0/firstrun/ – can you see what’s wrong with it?

I love event-listenery JavaScript as much as the next guy, but the icon on Step 2 suggested I’d be going to another page (c’mon, that’s just what right angle quotation marks have been co-opted to mean on the web!) while the browser wouldn’t say where.

Before visiting any actual pages in Firefox, not much trusting it at this point, I did some quick Googling and discovered two things:

  1. That you can bring back the status bar by simply typing ⌘ + / or Ctrl + /, and
  2. That, not knowing this, people have created at least one browser extension to do exactly that.

Fail.

Of course, if I’d bothered to actually USE Firefox for 2 minutes–trusting it even though it wouldn’t tell me where links were pointing–I’d have discovered that ordinarily it does. Pie-faced, I retreated to blogging angrily about how Mozilla’s first run screen is a great HTML5 page but a horrible initial demo of the browser’s capabilities.

A few observations from this:

  • Browsers need to tell you where you’re going next. Users don’t[/shouldn’t] trust the Internet enough to find out when they arrive.
  • None of this would’ve happened had the team creating the landing page used progressive enhancement and unobtrusive JS technique.
  • The team probably didn’t because they wanted to show off how well their amazing browser does fancy “HTML5″ (in the Jobs-ian CSS/JS inclusive sense) stuff. Fine, but also link to a page that has the same content.
  • Browser vendors are responsible for keeping user’s trust from the very start. This is a weird issue because it’s actually nothing to do with the browser’s functionality itself, but it temporarily impacted my opinion on how seriously Firefox take user choice/security/usability in a significant way.
  • No-one actually uses Firefox anymore, so it doesn’t matter. It is a pain while using Firebug to test my own sites, though. ;-)