The development of developers

I was thinking today about how good developers get to become great developers, i’m not there yet but I hope with enough willpower and passion I’ll get there some day. One of the things I’ve noticed great developers do is get involved in their industry, I’ve seen people with similar levels of experience in industry, and yet are light years apart technically, I think this can sometimes be down to the type of work you’ve been doing, such as ‘Cubicle Programming’ a term I use to describe a developer job where you just translate documents with no initiative.

When I see people who I really look up and and aspire to be like, a common factor is their engagement in the profession, they really *love* programming and developing, they attend events, do talks, take part in online discussions and QA sites. For me it gets too easy to just coast along with what you’ve got and just assume you are a developer, but more and more I see that you need to push that extra mile, it’s not enough to just be technically good at development, you have to eat, sleep and breathe it.

I remember myself waking up at 3am one morning and having a code epiphany, I’d been working on a dynamically built system and was having trouble working on the search engine component, and the solution to it literally came to me in my sleep, I wrote it down and when I went to work and tried it out, sure enough, it worked. I’d been eating, sleeping and breathing that problem for 3 days though, and it really was starting to get on my nerves, the feeling I had when it finally worked was so good though, it fired me up for the next challenge, and now I am hungry for the next problem.

One of the elements in my progression has definately been getting more engaged in the industry, I’ve been to a few events but plan on going to many more, as well as every now and again biting off a bit more than I can chew, and taking something on that at first seems almost impossible.

So, for anyone reading, I highly recommend seeking out a challenge and taking it on, and just when you’re ready to throw the monitor out the window and take a hammer to the keyboard, imagine how good you’ll feel if you crack it, and remember, there is a whole community of people out there who can help.

Posted in Uncategorized | Leave a comment

Polymorphism, is that some kind of superpower?

Hey folks,

I know for many of you, this is a bit old hat and for experienced developers, it’s a standard and not something anyone consciously thinks about, but it is worth a blog to talk about.

After reading a very interesting article on mocks and stubs while contemplating dependency injection and Castle Windsor (From http://codebetter.com/, well worth a bookmark, this article), amongst other things, it got me thinking about Polymorphism and how I was taught it at university. The problem I have is that the way in which they teach polymorphism (At least how I was shown) is very simple, and difficult to sometimes realise in an enterprise application.

Some of you will be familiar with the concept of having an Animal interface, IAnimal, with a method ‘MakeSound’, and a series of classes that implement IAnimal that have difference implementations of MakeSound, for example a Dog class that returns “Bark Bark”, or a Cat class returning “Meow”. What this essentially allows you to do is create methods in other classes that accept an object that implements IAnimal, and then perform operations on that object, without really needing to know the actual animal type itself.

You could apply this thinking to something like a rubber stamping machine, the stamping machine has a slot for a rubber stamp that is of a fixed size, and is able to use that stamp to make pictures, it doesn’t need to know about the picture of the stamp itself, as long as it can use it to stamp, so on the stamp, we might have a MakePicture method that’s called by the stamp machine, and that MakePicture method produces a different image depending on the stamp being used. So, we can pass in our Dinosaur stamp, which implements IStamp, to the PressStamp method of the machine, and it produces a nice stamp of the dinosaur.

Now, if we extend this a little further, we can see where the flexibility comes in, the stamp itself could have a property of type ‘Material’, this could be an interface and have subclasses of Rubber, Metal, Potatoe and influence how the texture of the impression is handled when calling MakePicture, by calling Material. ApplyTexture while printing, it could also be used to influence how quickly the integer ImpressionsLeft is depleted, based on the amount of paint applied.

Next, if we give some thinking to how this can be applied to testing. If we’ve programmed our classes to interfaces, it means we can pass in mock objects to testing methods and get a real result based on interaction with that object, we can also have in-memory storage instead of writing to the database, so that we can test the connection to the database separately.

Hopefully what I’ve outlined above gives you a flavour of what it is and helps you to see how it can be applied, coding in this way does inevitably increase the initial outline time in development, especially if you’re doing test driven development, but when you’re writing medium to large scale applications, having a flexible and extensible core in place will save headaches down the line.

As an afterthought, I would perhaps add one small caveat, in that, if you do start looking at applying more intelligent or complex designs to your solution, please, please, make sure that you 1) Document it and have someone else go through it to ensure it’s comprehensible and 2) Ensure anyone who might be working with you is fully up to speed on the techniques used. The reason for this is because I have seen a couple of systems butchered into submission because the original architecture wasn’t understood, I appreciate that the technologies used can be old, but quite often, if it is well engineered, swapping classes out and creating new ones isn’t all that bad, as long as they understand what’s going on. I’ve seen some applications that have 4 different layers for getting data, using ORM, sprocs, straight SQL connections and table adapters & data tables, this leads to complications and conflicts, and quite often the new layers put in circumvent important business logic.

So, make sure you document it, and make sure the documentation can be understood.

Remember, I’ve only been in the field 3 years as of writing, so, if anyone has anything to add to this, feel free to add it into the comments and I will amend if needed, but I hope you get the general idea ;)

Posted in Uncategorized | Tagged , , , , , | Leave a comment

A long time

Hello everyone (Anyone?), a lot has happened this year and I’ve been so busy tending to my life and wife i’ve not had chance to sit back and keep up with the digital times, so I’m back now with a vengeance and wanted to chat about a few happenings.

Let’s start with HTML 5, I’ve had a quick leaf through a few articles, rants and suggestions about it all, and one such page I felt summed it up quite well:

http://diveintohtml5.org/introduction.html

The wider article is also incredibly interesting and I recommend. In summary, HTML5 gives you more control and flexibility over how you design your website, without a whole bunch of tedious checks to see what’s now obsolete, the site will just work as always, but give you the option of having more interesting controls.

One key point that you should remember from the article is that you can’t detect support for HTML5 as a ‘thing’, you currently detect support for it’s individual features, such as the video tag. I’ll leave HTML5 there, as the article covers it in much better depth.

Moving swiftly on I recently purchased a server to compliment my new shiny fibre broadband connection, I’m currently just hosting a Minecraft server on there (Connect to mc.noirenex.com if you want to play) and will be running a virtual machine to host websites on there as well. I did originally try ESXi as a host but since the processors didn’t support virtualization, I couldn’t run them in 64 bit mode, which upset me enough to install Ubuntu server, which, as of yet, I’ve found to be quite stable and has given me a good uptime.

So, there’s a whole bunch of other stuff happening out there right now and I’ll post up as new things emerge, over and out.

Posted in Uncategorized | Tagged , , | Leave a comment

Development work

Just finished working on http://www.goingoutglam.com, they sell discounted premium cosmetics, top brands for cheap, pleased with the result, using the Prestashop system, a free open source package, definitely worth a look.

Posted in Uncategorized | Tagged , , , | Leave a comment

DDD8

Thought I’d talk a bit about my experiences at the DDD8 conference yesterday, I had a really good time and all the talks were great, very inspired and left me with a feeling that I need to try out all these different things immediately.

One of the talks I first attended was on test driven development, a late addition tot he schedule as I had originally planned to attend real world MVC architectures, forsaking the latter I was inspired to investigate TDD and am looking to apply it to a project I am currently working on as it is still in it’s early stages, the approach to the project using TDD leaves much less room for error, and if you don’t have a fully equipped Q&A team I think it could be a great way to take the stress off and, as Richard Hopton put it, ‘trust’ your code again, no longer having to worry about whether the next part you add will make your proverbial house of cards topple.

I also attended a session on unit testing but found that, while decribed well as a concept, the speakers application and usage of unit testing needed more time than an hour to demonstrate effectively.

Jon Skeet gave an admirable talk on C#4, key notes included default parameters and named arguments, as well as a few other shiny things from the interop side of coding, will look forward to 2010 as one of my current projects would benefit a lot from default parameters and named arguments.

Attended a talk on Microsoft Surface but left feeling that as a piece of equipment, it was shiny, but several aspects of it seemed lacking, such as having only greyscale imagery from the in built cameras, and the capabilities of what it can do were sparse, you are left to create anything you need from scratch, I anticipate future versions of the SDK will provide more tools and frameworks to work with.

Finally, last but not least, I attended Mike Hadlow’s talk on IoC containers, he spent a good portion of the talk on demonstrating programming to interfaces, which I thoroughly enjoyed, as it relit a fire inside of me, to re-awaken my thirst for better coding practices and creating maintainable applications. His demonstration of the usage of Castle Windsor as an IoC framework was good, it seemed simple and effective, so look forward to finding an opportunity to try this out, though will need to wait for DevExpress to finish updating their controls to work with MVC, as IoC frameworks don’t work so well without it (Or so I’m led to believe)

So, that’s all, I had a great time and feel invigorated watching how others write their applications, it has given me a new insight and passion to develop better systems, so if any of you ever get the opportunity to attend such an event, I highly recommend it!

My thanks also to a colleague of mine, you know who you are and what you did! Hope you like the mug :P

Posted in Uncategorized | Tagged , , , , , | Leave a comment

Merry Christmas!

Merry Christmas everyone! Hope you all have a good one!

During this month I’ve been scouring the web to find some good techie equipment sites and have come up with a couple of really nice finds:

1. www.mutr.co.uk – Sells all sorts of crazy science related things, from circuitry and electronic components up to crazy experiments you can do with your kids to teach them science, really fun just to look through all the wonders they have on a Sunday afternoon!

2. www.thehut.com – Offers free UK delivery, all sorts of different things here, the usual blurb, books, games, dvd’s, electronics, good prices and free delivery, worth a look!

3. www.okobe.co.uk – I got my iPod from here, good price and fast delivery, very good customer service, I had an issue with my ipod and they sent a replacement the day after and collected my faulty one, was very impressed.

4. www.virtualvillage.co.uk – Site that sells techie stuff and things you can play around with such as breadboards etc. I actually used this site to get some bulbs and circuitry for my car, was impressed with the range they had. Can be a tad on the pricier side though.

Hope these keep you occupied for a while, why not have a look for some ideas for interesting projects on www.instructables.com? Have fun!

Posted in Uncategorized | Tagged , , , | Leave a comment

OOps

Hey everyone, wanted to talk a little about object oriented programming today, a lot of people who are new to the concept struggle, I know I did, it’s quite a difficult concept, but once you grasp the basic, it’s a quick shot to start writing good, solid OO code, complex stuff like Design Patterns can come later.

OO Programming can be bloated in comparison to linear coding, but, aside from the initial complexity and outlay involved, in the long run, and when you have a good understanding of OO, it makes the application much simpler and a lot easier to manage, as well as reducing code duplication. Object are also useful across projects, if they arn’t too tightly linked into what you are doing, you can use them in other projects, such as a Person class, or an Invoice class.

The easiest way to describe objects and instances I can think of is follows:

An example could be a television set. The actual code which describes how it will act is like me telling you about a television, it displays an image, some have remote controls, it is usually rectangular and has many channels. An actual television would be like an instance of that description, there are lots of different types of television that follow the same rules. Objects work the same way, you have a class file which describes how the object will act, and you create instances of that object, you can have several instances of the same object with different parameters.

Posted in Uncategorized | Tagged , , , | Leave a comment

FreE-Commerce

Hi everyone, just thought I’d give a little review of some e-commerce applications I’ve used recently, one of which being Prestashop, I really enjoy using this package, it’s written in PHP and is the epitome of modular design, very nice to work with and no doubt I have probably made a few blasphemous code additions to customise one of my clients instances.

Of of the things I like is that it works out the box, it’s easy and it just works, not many e-commerce applications I tried did that, surprisingly. Even ones that said they would, Prestashop immediately empowered myself and the client, within a day they were uploading products and taking test payments. I’ve tried a few, zen-cart, virtuemart, oscommerce, magento.

Magento wouldn’t install, I read a few articles pertaining to adjusting the permissions, of which I am no stranger to anyway, but to no avail, it simply wouldn’t work for me, plenty of users suggest it’s easy, but for me it was a no go, it wasn’t as intuitive as prestashop, but the demo was very polished and presentable.

As for oscommerce, of which I am sure many a solid e-shop has been built, I found it to be bloated, slow and too difficult to get up and running, it wasn’t as streamlined a process.

There are a few negative points for prestashop though that can hinder you.

1. There are bugs: A few little bits and pieces are quirky still, I had issues with the contact form and with the cart display module, the ajax side of it was a little ropey as soon as I started making design changes.

2. There are a lot of files: As of writing, the upload takes around 30 minutes on a good broadband connection to your server, there are around 3000 files to install, this makes remote backups and restore somewhat time consuming compared to other installations.

Posted in Uncategorized | Tagged , , , , , | Leave a comment

When is code no longer code?

Recently I have been studying and investigating the benefits of refactoring, and to the (probable) annoyance of my colleagues, I have been preaching the practice.

I highly recommend looking into it, there are numerable benefits, particularly with medium sized projects. I mean really, the smaller projects tend to get released once, and never really change after that, so they are easy to maintain, and the larger projects require a lot more time to brew before you can do anything really serious.

So, what benefits? I’ve noticed quite a few myself, I never thought I would notice that much but, since refactoring some of my old code, I have noticed quite a few inefficiencies in it, and the architecture, by revisiting areas in more detail I have picked out quite a few minor bugs. There is also a certain satisfaction no doubt many developers get in creating OO code that is clean.

Looking to start some refactoring? I implore you to read around on http://sourcemaking.com/.

I’m not kidding you know, my attitude toward refactoring really changed, it’s hard to make time for it, but it’ll save you time later on, when instead of writing another 300 lines of code to parse a file, you have a library of objects all ready to go.

Posted in Uncategorized | Tagged , , | Leave a comment