Posts Tagged ‘code’
Friday, May 18th, 2007
Wil Wheaton on writing:
- Don’t be afraid to suck. It’s easier to fix something that’s broken than it is to create something from nothing.
- Write your first draft “with the door closed.”
- Don’t try to make everyone happy. If you try to make everyone happy, you end up with According To Jim. Write what you’re passionate about, and write to entertain, amuse, and satisfy yourself. To borrow a phrase from Joel Hodgeson, the creator of MST3K: don’t ask yourself, “Will anyone get this?” Instead, tell yourself, “The right people will get this.”
- If you’re going to write, you have to read. If you’re going to write screenplays, you have to read, and you have to watch lots and lots of movies, both for entertainment and for education.
This applies to programming as well (particularly the first two points), point 1 is a no-brainer - there will always be bugs in initial code (although there are ways and means to eliminate some - unit testing *cough*, *cough*) , but just for my own sanity getting that first draft is important. As to point 2, if a programmer says they’re not ready to demonstrate their code that should be respected. I often find someone wants to know how things are going while I’m still working on my initial version - which means I feel irritated, they form opinions based on something I’m likely to change anyway and nobody goes away happy.
Tags: code, work
Posted in computing | No Comments »
Friday, March 23rd, 2007
With Gaz’s help I’ve setup a basic Struts 2 project using Maven and NetBeans - I seem to have lost the ability to deploy within NetBeans, but I just downloaded Tomcat 5.5.23 and setup a context file pointing to the built project. All told it was easy - now I’ve just got to think of something worth writing :), and I’ll have myself an excuse for using something a bit more modern than the Java 1.4.2_05/Struts 1.1 rut we’ve got into at work.
Tags: code, maven, struts
Posted in Uncategorized | No Comments »
Tuesday, March 20th, 2007
Struts 2.0.6 (the first general availability release) has been out a month (but I’ve only just noticed). I’ve tried a HelloWorld app and after some difficulties got it running.
The difficulties were all my own fault - I kept getting the following messages: “There is no Action mapped for action name HelloWorld.” or “There is no Action mapped for namespace / and action name HelloWorld.”. They were resolved when I realised my struts.xml was in the wrong folder - by default this should be in the root of classes and I had it in the root of WEB-INF.
Tags: code, struts
Posted in Uncategorized | 6 Comments »
Friday, December 15th, 2006
Reading the comments to the latest WTF I’ve just found out that, when it comes to HTML, I am guilty of cargo cult programming, in particular the following is a perfectly valid HTML document
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<title>foo</title>
<p>foo</p>
You can try it for yourself at http://validator.w3.org/. Personally I still think the <html>, <head> and <body> tags are good style.
Tags: code, work
Posted in Uncategorized | No Comments »
Wednesday, September 20th, 2006
Stiff has a really good interview by email with some of the most well known programmers. Also available in Polish.
Tags: code
Posted in Uncategorized | No Comments »
Thursday, July 27th, 2006
This evening a colleague phones up - he’s working at a customer site and getting in his words “the dreaded NullPointerException”, fairy nuff it’s a bug so not good, but why dreaded? The bug fixes I love are normally those where the stacktrace shows a NPE (in a class I have source code for) with a line number, normally from there you can easily find which object(s) have potentially been assigned a null value and backtrack to find where they were supposed to be allocated. Far better than some wrapped exception where the programmer has ‘helpfully’ masked the real problem. Of course once you’ve tracked down where the null is coming from it is a good idea to convert the code so that if null is not a valid assignment it either prevents the null result completely or complains then and there.
Tags: code, work
Posted in Uncategorized | No Comments »
Wednesday, July 19th, 2006
I think I may know a lot of klingon programmers.
Tags: code, humour
Posted in Uncategorized | No Comments »
Monday, July 17th, 2006
Random Acts of Reality is probably the blog I’ve been reading longest and this made me smile
“I particularly dislike things that go wrong for no apparent reason. If I change something and break it then it is only to be expected, but these problems have seemed to occur due to random changes in the bedrock of reality. Ho-hum.”
As a developer coder programmer this is pretty much how I feel about every bug in my code - other people’s bugs are obviously different and due to incompetence :-).
Tags: code
Posted in Uncategorized | No Comments »
Thursday, January 12th, 2006
I’m temporarily back in portal land, compiling an existing portlet against a later, much refactored, version of the business tier and life is good. As opposed to a certain dual database project which I hate with a passion.
Tags: code, work
Posted in Uncategorized | No Comments »
Thursday, December 15th, 2005
The last couple of weeks I’ve started playing with Derby and DdlUtils at home, partly because I want an application I’m writing to have a database and partly because we are going to be using Derby at work and it always helps to have some advance knowledge.
Tags: code, work
Posted in Uncategorized | No Comments »