How do I program like a professional?

Associate
Joined
29 May 2006
Posts
2,276
Location
Hi,

I saw scope to do what I do at work significantly quicker and more accurately with the aid of some custom software, so I wrote a system in PHP/Javascript to achieve it. I enjoyed making the system, found it fun to learn about PHP and the puzzle solving that came along with it. I wont lie that what motivated me was the potential to shift my career, gain some valuable skills (£) and do something (potentially?) more enjoyable (at least mentally challenging). My boss was over the moon too!

I feel like I could be a programmer, or a developer, or whatever you want to call it. I can program, I've just proved it to myself. The next logical step seems to be to program LIKE a professional. How do I do this? Its one thing to program, but I want to program like a paid professional would. Think like a programmer, design like a programmer, write like a programmer.

I didn't really have any solid plan or model which I used to write the system. I just thought about it and did it, bit by bit, letting it evolve organically. I'm sure if a professional looked at it they would question a lot of it and do things differently. I suppose they would have had a solid plan and model laid out before they even started, too. Thats my inexperience I suppose.

I'd like some advice from the professional employed programmers here on how I can demonstrate to others that I am one of them, and in turn, be employed as they are, in the absence of a degree.

Any books or resources online that can help me morph into a professional? (Or at least resemble one) Obviously the PHP manual is a brilliant resource but it doesn't tell you when to use things or how to use them i.e. for instance, how/when/why to use classes and objects PROPERLY. (Just an example)

Thanks in advance :)
 
This varies depending on who your working with/for but if you want to broaden your knowledge then have a look at getting some design pattern and maybe object oriented programming with PHP.

Also recommend doing some work with a database MySQL will be your simplest option but a NoSQL would be better
 
I am technically a degree trained professional programmer of 6 months now and I still strongly believe that it is all down to experience.

Read as much code as you can, learn why people have done things the way they have (related to the patterns suggestion from Phunky) and code as much as you can, as intelligently as you can. Try not to cut corners and 'bodge' programs together and eventually you will develop your own professional style based on tried and tested methods.

A lot of my coding expertise comes from re-iteration. That is starting a program in a basic form, re-iterating over the design and re-coding it until eventually I learn and do the final interation of my last program the first time on my next program.

As for books I would recommend anything that talks about design patterns. There is an old but well regarding book somewhere which disccuss patterns in software engineering and relates it to architectural (buildings) patterns which is a good introduction.

Edit: Pattern-Oriented Software Architecture Volume 1: A System of Patterns
 
Last edited:
Mostly through practice.

Set yourselve little challenges and write code to solve the task.
It doesn't have to be complicated, one of the examples that I've seen work well is writing a piece of code to calculate a ten-pin bowling score.

A selection of examples is here: http://codingdojo.org/cgi-bin/wiki.pl?KataCatalogue

If you do stuff like this, then make an effort to to it test first.
Write unit tests for the functionality you know you're going to be implementing and then write code that makes the test pass.
As well as just being general good practice it encourages you structure your code in a way such that it isn't just a single big blob.

If you're up for a little criticism, then even posting things up here and asking for comments would no doubt be beneficial.

This is a good reading list of books that aren't about any particular language, but that will help you become a better developer:
http://www.codinghorror.com/blog/2004/02/recommended-reading-for-developers.html
 
The ten pin bowling dojo/kata is actually a barsteward of a kata. Perhaps stick to the ultra easy, and keep doing them again and again. It's all about practice, so removing the focus on the problem lets you focus on the practice.

Then apply those well rehearsed techniques on larger problems. Just like a real dojo, practice kicking and punching a hundred times, before you get into a situation where you'll need to kick or punch. :)
 
I'm sure if a professional looked at it they would question a lot of it and do things differently.

Ha, if any professional looks at any other professionals work then the same is always true.

Think of it as an art form. In coding there is generally no 'right' way, its how you interpret the task that shapes the code. That just comes with experience so choose your language, stick with it and just create stuff. Then look at what you've created think how it could have been done better and do it again, and again, better each time.

I found the easiest way to learn a new language is not by just reading books (although of course I do that), it is by setting myself an entire app to build then building it from scratch as a learning process. For example, you choose PHP and then say i'm going to build a Twitter Client. You'll be surprised how quickly you can build that app and you suddenly have experience in designing an interface, parsing XML, network communication etc etc. FAR better than going through tutorials because you now have a working app and you know what makes each part of it tick. You can then go back and redesign and refactor until you are happy with YOUR app.

Obviously everyone learns differently, some people cannot learn like that but it works for me! I was originally an ASP 2.0/3.0 developer, then moved to .NET ten years ago and I now also write iPhone & WP7 apps too using that technique. When I picked up iPhone development I didn't know any Objective C, didn't know XCode and didn't really know much about Macs either! But rather than 'learning', I picked one of my .NET apps and just said right, I need this ported to iPhone and in the App Store asap. It was finished in a couple of months of evenings/weekends and I learnt a shed load and hadn't wasted any time either!

If you want to earn decent money, PHP is not really the way to go though as the market is pretty saturated with developers and rates are low compared to the more commercial C#/VB.NET/Java/Obj C/C++ etc but it'll give you a good grounding in the basics ready to move onto something more lucrative if you want.

Another good one is HTML5, mobile development is going that way so thats worth getting to grips with along with the popular javascript libraries.
 
Practise makes a huge difference. However, some of the features IMHO of really well written software are:
1) a really easy-to-use interface that follows windows standards (there used to be a book on how to do this)
2) really good error handling - for example if a file or table can't be read, don't let the program fall over with a mysterious error, tell the user what the file etc. is, and record the fact in an error log with as much information as the program will give.
3) remembers all the user's settings - I used a program once where one particular setting had to be reset each time I loaded as 'that made finding what problems were easier'


You also have to understand the business needs so the program actually meets them.
 
The way to be a good programmer is to never stop learning. Never believe you know how to program - always be very, very critical of your own code.

(+ get code reviews from experienced programmers as much as possible)
 
I regularly have to look at code I wrote 3-6 months ago and the "wtf quota" is usually quite high.

If I ever stop saying "wtf", I know I'm in trouble.
 
Coding inside a framework is helpful. For example most web-development frameworks implement the MVC design pattern so if you just use the framework properly you get hands-on experience of its benefits. Nice frameworks like Yii are object-based so you can get a good feel for why modelling solutions in terms of objects can really make your life easier. You can also get a better feel for general conventions. Frameworks are written by people who understand development very well and you will just naturally pick up things by reading their code. Testing is also very important. The confidence gained from writing tests for functionality before you actually implement the functionality is brilliant.
 
I regularly have to look at code I wrote 3-6 months ago and the "wtf quota" is usually quite high.

If I ever stop saying "wtf", I know I'm in trouble.

This.

I find it very humbling to be able to look back at where I started and the whole "why the hell did I do it like that" sort of thinking.

I started on MYSQL and T-SQL. Now looking to get started at languages more focused on creating applications and such.
 
Back
Top Bottom