Pausing for thought

Birthdays are always a good excuse for pausing, taking stock and checking life is still on the path you’ve chosen. For fun, and also because I am a curious soul that cares about what other people think and how they measure me, I did a Myers-Briggs test again today.

Apparently, according to my results my most likely careers are writing and counselling and the most important facet of a job for me is how meaningful it is. I find this very interesting in the light of two observations of my early life I had believed for a very long time: that I am a selfish person and that writers must have something to write about.

Times have changed since I first heard those comments, there is an influence on writing styles which has evolved, insisting that 800 words is enough for anyone in one sitting, one must assume that the reader has no attention span and that only one sentence should be used in a paragraph. In addition it seems anyone can write about anything so not having anything meaningful to write about is no longer a barrier. I’m not sure I agree with the turn writing is taking but in my selfish need for permission to write I’m going to take it and run!

 

A Promise

There were some very inspiring keynotes and talks at php uk 2015 which lead me to catch up with many of the speakers. I’ve been a member of the php community since 2008 although my involvement has been very on and off. I’ve a few years worth of experience since then and it’s certainly time I gave something back; so I have made a promise, to Jenny (@miss_jwo), to the php uk community and to you – in the next year I will give at least one public talk.

I have too many ideas to know what the topic will be but:

  • it will be tech related,
  • it will most likely involve php,
  • it will possibly be rubbish but
  • it will be given.

More news to follow…

This weeks lesson : frustration

This last week has been a lesson in frustration – changing requirements, dependency on offshore decision-makers, flakey debugging environments and forgotten code constraints.

These things have always lit a fire under my calm exterior and left me wanting to scream, throw the laptop out of the window and snap at all my colleagues who only want to help. This week was different and it’s a strange (and wonderful) new world.

Continue reading This weeks lesson : frustration

Some things never change

The lessons here are ones I’ve taken a while to learn and they are relevant to coding and most things in life and they have not changed in the six years since I first posted them!

I hope this blog post helps others learn them quicker:

  • Conclusions drawn, even by the ‘wise men’ in a community should never be taken on their own, as gospel.
  • Always check the date of a resource if you can.
    (most of the posts on here are several years old!)
  • Do your own tests.
  • Join in discussions and check your view against that of others.
  • Go back and review your own conclusions after time, has anything changed? new techniques or technology been released? did you jump the gun?
  • Never be afraid to admit you would change your mind (even if it’s only to yourself).
  • Never be afraid to try something new.

It’s been a while…

I’ve moved domains, changed jobs, closed my business and visited at least two new countries since last posting on any public blog!

Porting the blog across from the old domain has involved fixing it, reading it and potentially pruning it heavily (still ongoing).

I’ve learned that while my career has moved on and I’ve taken on more then less responsibility and expanded my (coding) languages count from few to many some fundamental things don’t change and I’ve found myself returning to some core lessons – again for the first time. Posts to follow!

Three things I wish I’d known before …

… starting the Sun Java tutorial

It’s been over a month since the last blog entry and it’s been a busy month:
finishing off projects
planning a holiday biking round the south of france on a GSXF
and
getting a new job.

The new job was the impetus to take on the java tutorial, trying to get my head around strict typing, odd syntax, compiling code and a whole new API. That’s all hard enough but most of the brickwalls I’ve been banging my head against aren’t down to understanding the language… they are down to how Java is set up and the environment it expects. I feel like I learnt the lessons all in the wrong order.

So for my memory and others out there who’s javac won’t run and whose java class cannot be found, here were my Three Things I Wish I’d Learnt First…

[edit jan 2015]
those three things got lost… so the real lesson is when porting an old blog from one site to another:

  • always make sure your blog software was kept up to date
  • check the source of your posts for substituted rubbish
  • prune old posts vigorously!

My Unecessary csv Conversion

I’m finding that I’m doing some things the hard way, maybe it’s just I’m looking at problems differently to others. Take my latest fun freelance challenge:

Convert data from csv and import into database using phpMyAdmin (access details will be supplied).

I saw this as: convert .csv file to sql file then use phpMyAdmin to process sql file either by quoting sql in the sql query screen or using the import from sql file.

The simplest way to see this is actually:
get data from .csv file into database using phpmyadmin as database access.

The difference might be subtle but my first solution was a quite a bit more complex. Continue reading My Unecessary csv Conversion

Navigation revisited and freeing your thinking

Revisiting Navigation

Last month I set out my view of using <nav> and <ul>s for navigation purposes. This was as a reaction to feelings in the php development community against changing the default behaviour of <ul>s using css.

The message that came across clearly after the fact was: the objection was not to the use of <ul>s as parent elements for a list of links. The problem comes with the styling:
/*css seen as a problem */
ul {text-align:center;list-style-type:none;}
li{float:left;}
a{display:block;padding:2px 5px;}

The problem is that default behaviour for all <ul>s is changed so <ul>s elsewhere in the page will be styled like this.

/*css seen as a reasonable solution */
nav ul{text-align:center;list-style-type:none;}
nav li {float:left;}
nav a{display:block;padding:2px 5px;}

Just the behaviour for children of the <nav> element is changed leaving other <ul>s to be styled differently (or defaultly).

This is a really subtle distinction and I don’t mind admitting it took me a while to sus out. The argument isn’t against using <ul>s in navigation but advises us to do so in a careful and considered way.

Not using <ul>s closes the door to such enhancements as submenus and accordian style menu layout. This shows up my intial example last month, at best, as being oversimplistic and a bit naive.

Jumping to Conclusions

It’s not the first time in my life I’ve jumped to a conclusion. Another I’ve revisited recently can be succinctly summed up in a sentence from PHP in Action:

Alternatively, we could achieve the same effect with Javascript, but it’s better to avoid Javascript if we can, since some users disable it in their browsers.

Reading this recently initially reinforced my long held belief that Javascript is Bad because some users disable it.

The desired effect mentioned in the quote from PHP in Action is getting submit buttons to generate individual commands where there are multiple submit buttons in a form. The authors go on to suggest solutions in javascript which work where there is already javascript present in the form so they aren’t really saying Javascript is Bad so Don’t Ever Use It.

I first hit the ‘Javascript is Bad’ assumption in accessibility and coding circles in about 2003 when the numbers of users with disabled javascript were about 20% (based on visitors to W3C at the time). As a result of taking it for granted I spent six years not bothering to learn much javascript because it’s Bad.

What a waste!

The Real Lesson

I am quickly working to fill this ridiculous hole in my knowledge, with the understanding that javascript should be used with care, for tasks where it is the best fit and always ensuring that all the functionality of the site is still there if a user should have javascript turned off or uses a screenreader.

The lessons here are ones I’ve taken a while to learn and they are relevant to coding and most things in life, I hope this blog post helps others learn them quicker:

  • Conclusions drawn, even by the ‘wise men’ in a community should never be taken on their own, as gospel.
  • Always check the date of a resource if you can.
  • Do your own tests.
  • Join in discussions and check your view against that of others.
  • Go back and review your own conclusions after time, has anything changed? new techniques or technology been released? did you jump the gun?
  • Never be afraid to admit you would change your mind (even if it’s only to yourself).
  • Never be afraid to try something new.

Is there anything you don’t agree with? have I missed something? what assumptions have you challenged recently (your own or from others)?

html markup for navigation

There’s been a lot of griping today about the use of an unordered list for a navigation menu (from @calevans among others). Although it is a generally accepted practice with the argument that a navigation menu is an unordered list of links, it’s not too difficult to find an alternative that is just as efficient is it? What’s the most basic code we could use as an alternative?

In html5 you could use the following: –

<nav>
<a title="First link additional text" href="#">Link 1</a>
<a title="Second link additional text" href="#">Link 2</a>
<a title="Third link additional text" href="#">Link 3</a>
</nav>

with css to sort out positioning and look.

For some specific layouts you may want to specify a :first-child pseudo class or a class="last" on a link.

For HTML4 strict just substitute a <div class="menu"> for <nav>.

So, not as complicated as I once thought!