tsdbrown: think it. design it. develop it.
Blue_rss_icon

The smartest, ideal, efficient programming can still look awful!

I always try my best to write extremely neat code; even if I fail. I’m a complete stickler for it. I think it’s because as a programmer one of things that frustrates me most is looking at messy code. Before I can even begin to start solving or understanding the logic involved I often spend time sorting out the indention. Whilst doing that I’m usually thinking “this should already be done, not many clients are particularly willing to pay for time spent on this”. The idea of re-factoring bad code is a difficult sell; we’ve found explaining the long time benefits and future time saving can help.

I think my C programming tutor back at uni grilled it into me, that the code just has to be neat and well organised, even if it doesn’t work initially. Thinking back it was probably just to make her life easier, seeing as she had to review it all. But hey the result it’s had on me is hopefully a good thing, helpful to me and others who look at my code.

Building Rails applications daily does tend to help with many conventions; most of the code I pick up has that going for it, although staying DRY, useful comments, good documentation, sensible variable names and consistent indentation especially are often slightly lacking.

Everybody is probably guilty of thinking I’ll just get this working first, then I’ll organise it afterwards. The problem I’ve found with that approach is it very rarely gets sorted, leaving your perfect solution looking a little wilted, confusing and quite simply messy. If like me you feel you could improve and would like to perfect the readability of your own code, I suggest you checkout the Top 15+ Best Practices for Writing Super Readable Code article posted this morning. It’s a great tutorial; just imagine the hours we could save ourselves in the long run…

Awesome looking buttons for all your web application needs

Today I was asked to create better looking buttons for the project I’m working on “just like those one on the Apple website”. To be fair my first attempt was looking pretty poor so I decided to correct it.

In the past I’ve gone down the route of creating a nice looking base image (which probably took me an age) and saving it out many times based on the text; but 50+ buttons later that soon became extremely annoying! I’ve used the sliding doors technical a couple of times but with the spans and links that just doesn’t sit with me, especially as buttons are a constant reoccurring element in our web applications.

After a quick Google I found this page by ZURB: Super Awesome Buttons with CSS3 and RGBA, a simple use of CCS3 and viola! The buttons look decent enough in IE and they’ve even gone to the effort of creating extra classes so basically you pick your size, colour and you’re done!

I’d be please to hear what techniques anybody else is using?

tsdbrown: the online home of Luke Brown © Luke Brown. Valid XHTML and ATOM. Powered by Enki.