A Website In A Day? Surely Not!

Feb 23
2010

This week at work I have an interesting dilemma. We have to have  website ready to show one of our suppliers on Friday. There’s normally two of us in the office and this week, due to illness, there’s just me. I’ve got the task of throwing up a blog site various areas of dynamic content in two days. But wait! I’m going to be otherwise engaged for most of tomorrow which leaves Thursday to create a website. I’ll be using a pre-built theme and WordPress with very little customisation, normally an integral part of installing awebsite like this.

I don’t even know if this is possible but we’ll soon see. Websites can be tricky when installing at the best of times, especially when using SSL certificates. Probably won’t use SSL on this particular website but still, one day for a website. What an interesting proposition that one will be. Let’s see if I can pull it off. That would definitely be one for the portfolio.

Hope I survive the next couple of days. See you soon.

Site Up – www.gymworld.pro (It’s a Blog)

Feb 23
2010

I finished the blog site last week.  Not bad for three weeks work. The Gymworld Blog has loads of cool stuff on it like competitions where you can win things like a Nintendo Wii, an iPod, loads of stuff. I’m really happy with this site and I’m definitely looking forward to putting up more like it in the future (which is going to be this week – yes, another site in a week!)

It’s nice to be ambitious about my career. My work was unfortunately stalled for a few months due to several reasons outside of my control but now I’m back on track and enjoying programming, writing, designing – everything basically. It’s great to be making a difference.

A lesson (for me) in xml

Feb 18
2010

I came across a problem today that I had absolutely no idea how to fix that was due to my somewhat rudimentary understanding of xml.

Basically, we have a feed coming from one website that gets imported into another one of our websites at work. In that feed there are tags like <a href> and <p> but when it gets to the finer points of html like classes and id’s, xml doesn’t export them. The xml markup does, however, support some inline styling. How bizarre. If it’s not a language intended to display data, why have any presentational functionality at all?

This won’t be new to anyone experienced at taking data in various formats from different sources (xml feeds, databases, etc). The problem I had is that I want to present the information from the feed without having to manipulate the presentation after the import. I know there’s going to be a simple way of doing this but at the moment I’m at a loss.

It’s nice to be dumbfounded. It means I’ve got some nice interesting stuff to learn. If anyone has any good suggestions about where to start when trying to bring in an xml rss feed and then adding presentation then please feel free to leave a comment for myself and other ‘would-be xml monkeys’.

ol displays single digits (looks like it only goes to 9)

Feb 16
2010

When working on the WordPress blog site at work today I came across a very peculiar bit of css buggery by the people who created the WordPress theme we’re using. They’d gone so far into making the css complete that they’d even styled ol lists which aren’t usually used in very many circumstances. Not only was this a waste of time for them but it created a problem.

Browsers aren’t made haphazardly like they used to be. The default padding, margin, etc that most modern browsers use is actually pretty good and replicating it for absolute clarity is probably the best way to go. In the case of our theme developers, they took padding away from the ol (they changed it to 2px). What this essentially did was make it so that the ol list items (li) could only display with one digit (…7. , 8. , 9. , 0. , 1. ) which looked like they were looping back on themselves and creating a list starting from 0.

Why on earth WordPress theme developers feel the need to mess about with css to this level is quite beyond me. It makes themes unusable. It’s very rare that someone who can install WordPress would take a theme as-is. People who install themes are generally developers and hindering them isn’t really the way to go.

If you’re a WordPress theme developer do yourself a favour: give it a rest with the minutiae of css. There are certain things integral to a theme like background images which need to be edited, whereas ul and ol elements for use in general text do not.

Editing Decrepit Code

Feb 13
2010

It’s not always fun editing someone else’s code. Sometimes it’s elegant, tidy, succinct and brilliant. We’ve all come across those little code nuggets where we’ve thought “Ah! Genius!” (and then swiftly ripped it off). But then there’s the other, unfortunately more frequent kind of work.

I’m talking about spaghetti. There are many people with lots of experience but that doesn’t seem to lead to elegance, many times actually the opposite. Now I’m not holding myself above this. I’ve made absolute atrocities in systems I don’t understand but I’m relatively new compared to seasoned programmers.

I suppose it comes down to time. If you’re used to implementing a framework then you can literally throw up professional, functional websites from scratch in a short space of time. If, on the other hand, you’re editing a pre-existing procedural minefield, it’s never that easy.

It sort of begs the question: If you’re going to edit a website in any major, fundamental way, and it uses outdated code practices or even an outdated language, is it better just to start from scratch and let the client know that from the offset? There are often times when quick fixes are needed but why bother trawling through a mess for a major update? It’s relatively easy to get HTML and CSS working these days so a re-skin of a pre-built system to look like the old site would probably in many cases be a great solution. Admin systems are better these days too.

Bin the burnt spaghetti and get out the pre-made pasta sheets.

Proof Reading Essays: Glad I’m Not A Student

Feb 13
2010

Just gave my girlfriend’s essay a look over and it made me glad I’m not a student. As much as I enjoy writing, the creation of essays and other university work always seems to be lacking a little real-world charm for me. There’s always a target when you have to write something in real life. You have a target audience and an idea or product that you want to put across or sell. There’s always a clear end goal. With essays there always seems to be an un-natural stricture to the writing. Don’t ge me wrong, I actually like a nice challenging piece of writing every now and then, but there’s always a better way than a set structure. It’s how we evolve.

It’s a good job real life doesn’t have a marking structure isn’t it?

Sitemap

Feb 06
2010

Page 1 of 2 : Next Page

Posts

Pages

Page 1 of 2 : Next Page

Plugin by dagondesign.com

Aww, ain’t they cute!

Feb 08
2010

Just watched the first two Harry Potters last night and tonight with my lovely lady. It’s funny watching them going free wee bairns to voice-cracking teenagers, especially Ron.

It’s good to relax when you go home from work. It’s nice to get stuff done sometimes but I’ve found it great to relax these days when I’m at home (or not). We work too much sometimes, especially in the UK. If you’re good enough at what you do, you generally shouldn’t need to work yourself to the bone.

Anyhoo, soapbox stepped down from. Tattingsbury.

Who Loves The Weekend

Feb 06
2010

After a hard week of non-stop slog constructing a website I’m glad for the weekend. I’ve been working on the blog website for Gymworld and it’s pretty much ready to go live now. Not bad for five days’ work!

It’s been interesting to delve into WordPress once again. I remember how much of a nightmare it was when I first started to use WordPress. The mixture of the huge functions page mixed with object orientation threw me a bit. It’s not really a truly object oriented system as I once thought. It definitely could be a lot more elegant but maybe that would take away some of it’s ease pf use for the people that are used to it.

For future developments, I think I’ll look into a more advanced system, although that doesn’t mean to say more complex. I think I’ll be happy with a fully object oriented, class-based system rather than using functions here there and everywhere. It used to be the way of working when programming websites procedurally, but even in my experience I can see how object orientation is a benefit.

WordPress get_meta() Function Amendment

Feb 09
2010

Not to go into too much detail, but today I came across the need to get a Custom Field Value without the Key or HTML presentation. It didn’t take loads of digging but I thought I’d jot down my method for anyone who wants a nice quick solution to an otherwise troublesome problem.

I found the get_meta() function, which is annoyingly in a file called page_template.php which resides in the wp-includes directory. I don’t think the creators of WordPress quite understood naming conventions, the page_template.php file actually being a bucket-load of functions rather than a template, and functions that print HTML. Eugh!

I then chopped up the function and wrote a newly named version of it in my theme functions.php file. Not too hard but a very useful bit of code for future use.

WordPress is a bit of a mish-mash system sometimes but it does seem to get the job done efficiently as long as you don’t have a graphically bloated theme (so passé – who’d use background images in a theme :) ) Just remember, if you think something will be in a certain, aptly named file – WRONG! Try again.

On that point, the WordPress Codex is good only if you know what you’re looking for. After a while of working with the half brilliant, half ridiculous framework, you get used to asking the right question, but it’s a bit of a bitch at the start. I think I’ll start from the codex up next time I learn a CMS (soon), y’know, RTFM.