Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment Avoid over engineering and over generalising (Score 3, Insightful) 394

The biggest programming mistakes I've had the displeasure of making, or discovering in others code, almost always centre around one of these two problems:

1. The code is over-engineered
2. The code was abstracted before there was even a need for the abstraction.

I remember when I was less experienced, how thrilled I'd be over code that was clever, solved many problems aside from the one I was trying to solve, and had some clear reusability built in. What a work of art, I thought.... until I eventually realised that much of the extra code I had written didn't get used, the abstracted code was never reused - or even if it was, I couldn't predict how it would be reused and the abstraction was clumsy at best, useless at worst.

It's sad when this happens - good intentions, but the end result is a lot of waste. I'm embarrassed to look over my earlier code which is like this.. I like to think I do it less now, but the temptation is always there... I'm going to need to do this later anyway... I can just abstract this bit here and reuse it some day in the future...

My advice now... Don't do it! Just wait until the reuse case comes along, or the new feature request comes along, and *then* do it. You'll know so much more about the problem domain then, or you might avoid days (weeks!) of wasted effort.

Comment Seven weeks! (Score 2, Interesting) 108

NASA teamed with Armadillo Aerospace and Draper Labs ... to integrate and flight test a real-time navigation system in only seven weeks.

They probably just replaced their Waterfall software development process with something agile, like Scrum. :)

What's that, three two-week iterations with one one-week pre-launch crunch?

Comment Re:Testing (Score 2, Informative) 197

Yes, Django does have testing support, and Django itself is quite well tested - so I agree with you. The point I was trying to make is just that testing wasn't really a priority amoungst developers in the way it is in the Rails world. Things may have changed now.

As for talking about professionalism, it's more just a case of being fustrated by developers not testing their code - and it happens in all languages (and I do it sometimes too). It's just less common a problem in Ruby/Rails in my experience.

Comment Testing (Score 1, Interesting) 197

Slightly off-topic, but since a lot of comments are about how Ruby and Rails has nothing other popular dynamic languages and frameworks have to offer, I'd like to say there's one thing which drew me to Rails which I couldn't find in any popular Python or PHP web frameworks.

Testing. Craftmanship. Quality. This is more cutural than technical. While it's technically possible to write tests in PHP and Python, it just seems like people rarely do (especially so with PHP). And even if they do write tests, it's an afterthought. Things may have changed since I've done any serious development in PHP or Python, but I've done a little with Django and the testing that's done in the community didn't come close to Rails at the time. I'd be lucky to find a plugin authour whom had a test suite for their work and there was nothing of the function or quality of RSpec or Cucumber around.

This kind of lax "I tried it in my browser so it works" attitude to web software development in PHP and Python almost made me want to give up on web development and get into some other type of programming with some real professionalism - but thankfully I found Rails and glad that in general Rails programmers take their work seriously.

Having said all of that, I don't want to paint too negative a picture of Python. There are some awesome frameworks and communities in the Python world - Twisted/Divmod, for example, where the community really are bright and dedicated to test driven development. Zope 3/Grok is another. But I couldn't find anything in the mainstream web development world which were. Being mainstream is unfortunately important in getting anyone to support your descision - be they management, or a client.

Comment Re:Look at Japan (Score 1) 585

I was going to mention Japan too. I remember after spending some time there and getting a train for the time since I'd gotten back, thinking how rude someone was for having a conversation on their phone on the train. I laughed about it once I realised my reaction but even now I still get annoyed by people having non-essential conversations on the train. Sure, calling someone to pick you up is no problem, but talking about your relationship problems for 30 minutes in front of a car-load of people? Maybe some people find it therapeutic.

Comment Re:No more working for the man (Score 2, Interesting) 453

I don't know... I have briefly tried freelancing but I can't shake the feeling of just wasting my time. I really don't like being a lone programmer sitting in my room trying to find ways to fill my time, doing whatever work I can find. Even if I go out, I waste so much time travelling from cafe to cafe. It's fun for a while, but when I really want to get stuff done, I *need* an office. Perhaps if I was freelancing in a shared office setup it would be different. I just can't work from home. I also miss things like having other people to bounce ideas off and larger projects.

Also, I found that I just don't like looking for work and worrying about finances. I want to spend as much as my time as I can actually writing software, so perhaps I'm better suited for employed life.

I find it interesting because I also see this trend towards freelancing, and the majority of programmers I meet are very happy with the lifestyle.

Comment Re:Is this new? (Score 1) 168

"Grandpa, there's this new programming language that all you have to do is write once and it runs everywhere! I invested my life savings into it!"

I pictured Duke[1] in some futuristic space getup when I read this.

"Live long, and com.sun.java.salutations.IProsper" (using an interface, you can prosper in any way you see fit!).

[1] The mascot, not the game character.

Comment how many? (Score 1) 95

"There are numerous other Duke games in various stages of development, several due out this year. We are definitely looking to bring Duke into casual gaming spaces, plus there are other major Duke games in production."

So that's multiple major Duke games plus several smaller ones with more than one due out in 2010?!

Hillarious! It's like when you ask your friend starting a business on their own how that are doing and they'll say something like "Oh yeah doing great! Got a few things on the burner, with a couple of them looking really good, and few other interesting things going on." which really means "I have no work, but don't want to admit it" :)

Anyway, good luck to them!

Comment lots of authors (Score 2, Interesting) 227

Funny... I sent the link to a friend who does GRB-related research, and she said "thanks, I already know about it though, I'm one of the authors" :). Apparently there are 210 authors on that paper though. Imagine coordinating that.

Anyway, I don't know a thing about astrophysics so that's about all I can contribute to this discussion.

Comment Re:Ruby? (Score 2, Insightful) 191

So you're suggesting that instead of creating languages like Ruby, we should create libraries to more complex environments like Java to make them faster to develop with? Variety is the spice of programming :). Personally, I'm glad languages like Python and Ruby exist and they are not only great and productive languages, they have both made me rethink the way I write software. I'm not sure just adding on top of Java would have achieved the same thing.

Slashdot Top Deals

Never call a man a fool. Borrow from him.