language-agnostic

Is TDD overkill for small projects?

Hello, I have been reading quite a bit recently about TDD and such and I'm not quite sold on it just yet.. I make a lot of small hobby projects(just me) and I'm concerned if trying to do TDD is overkill for such a thing. Though I have seen small open source projects with like 3 developers that do TDD. (though I have seen a few one-person...

Placement of defensive structures in a game

I am working on an AI bot for the game Defcon. The game has cities, with varying populations, and defensive structures with limited range. I'm trying to work out a good algorithm for placing defence towers. Cities with higher populations are more important to defend Losing a defence tower is a blow, so towers should be placed reasonabl...

Resources for faster programming

Possible Duplicate: As a programmer what single discovery has given you the greatest boost in productivity? This is a community wiki to get a list of resources, that you consider helped you, to do faster programming, such as macros, intellisense, autotext replacer etc... I will start the list with the following: using two m...

Where to get "projects" to do / implement?

Hi, I'm doing a CS degree and right now I'm kind of bored (that's not the word, but I don't really know how to say it). I mean, I have lessons and all but right now I'm taking just a few courses so I have plenty of free time, so I would like to invest part of that time in programming something. What I'm looking for are kind of specifica...

Graceful maintenance of web applications...

Yesterday's Stack Overflow downtime got me thinking about this a bit... I live in Australia (though this is probably true for most people in a non-US timezone) and am constantly greeted with "... is down for maintenance" right in the middle of my work day. In fact, in the last week we've had Google Wave, SO and Campfire all take turns ...

How does the Amazon Recommendation feature work?

What technology goes in behind the screens of Amazon recommendation technology? I believe that Amazon recommendation is currently the best in the market, but how do they provide us with such relevant recommendations? Recently, we have been involved with similar recommendation kind of project, but would surely like to know about the in a...

Does it make sense to create a repository that takes a default search criterium as constructor argument?

I'm refactoring a website I build. It's a website for a travel agency. I'm thinking of implementing the repository pattern. The travel agency has two divisions, that have their own website and target different groups of customers. The backend however is the same for both websites. They both access the same DB tables. Some tables simply ...

Best datastructure for a heightmap

I have a heightmap (a 2D array of floating point values) and I wish to find the highest point on the map, once I have found this point, I want to change its value, and the values of all nearby points. What's the best datastructure to use for efficient retrieval of the highest point? Requirements: Find the highest point efficiently Cha...

Is it worth creating a method if it is going to be called just from a single location?

A discussion I had today at work with one co worker. Is it worth creating a separate method, if it is going to be called just from a single location?. True, may be in the future you will have to call it from more places, but for the sake of the argument let's assume that it is known that it will never be called from any other place. If...

What was "The Next Big Thing" when you were just starting out in programming?

I'm at the beginning of my career and there are lots of things which are being touted as "The Next Big Thing". For example: Dependency Injection (Spring, etc) MVC (Struts, ASP.NET MVC) ORMs (Linq To SQL, Hibernate) Agile Software Development These things have probably been around for some time, but I've only just started out. And don...

What is a Custom Class?

Many questions here on SO ask about custom classes. I, on the other hand, have no idea what they're talking about. "Custom class" seems to mean the same thing I mean when I say "class". What did I miss, back in the '80s, that keeps me from understanding? I know that it's possible to purchase a packaged system - for Accounting, ERP, o...

A user management system for a new app?

im using python. is there a widely accepted way of doing it? it deals with some data management things, so i dont want to implement it like in stackoverflow, with anonymous accounts. i also don't want to roll my own system from scratch. any recommendations? ...

How do i refacter a 100 function class

I haven't counted but its a lot. How do i refacter a 100 function class? This is for a website, i use to have a PageView, Backend, DB layer where PageView calls the backend, every backend public function checks if the user meets the required authority then calls the DB or any other code. It wasnt as nice as it may sound, each of them ha...

Is internationalizing later really more expensive?

Most people would agree that internationalizing an existing app is more expensive than developing an internationalized app from scratch. Is that really true? Or when you write an internationalized app from scratch the cost of doing I18N is just being amortized over multiple small assignments and nobody feels on his shoulders the whole w...

What is the best Pro OOP argument?

I am trying to get a couple team-members on to the OOP mindset, who currently think in terms of procedural programming. However I am having a hard time putting into terms the "why" all this is good, and "why" they should want to benefit from it. They use a different language than I do, and I am lacking the communication skills to expla...

suspend/resume task

Hi, I am asking question about multithreading in general. For example I locked a mutex and resume the task, then I want to suspend it, my question is, should I unlock the mutex before suspending it? So that when I resume it again with mutex it will resume successfully? I just got started in multithreaded stuff and I am having a hard ti...

When is abstraction and modularization a bad practice in programming?

just saw this comment in a "what JS lib do you use" poll "@Xanti - yes, yes, modularization and abstraction in programming is a terrible practice. Functions that call other functions? Wasteful." And that left me curious because I am using Kohana framework for PHP and Jquery library for javascript. Why do some people consider abstract...

How Can Paper Prototyping Help in Development?

Possible Duplicates: Do you feel that writing on paper helps you develop better? What advantages does sketching a user interface on paper have? drawing interfaces in paper, having huge piles of paper demonstrating the "flow" of the program, having to have a huge eraser in case of changes do not seem appealing to me. Yet a l...

OO Pattern: Shared work between abstract base class and subclasses

I have an abstract base class T, from which classes A and B inherit. I now have an operation (on T) which requires a slightly different implementation in A and B, but most of the code is the same. Let me give you an example: There are two possibilities to implement something like a .Clone method: Public MustInherit Class T Protected...

How can I print out all possible letter combinations a given phone number can represent?

I just tried for my first programming interview and one of the questions was to write a program that given a 7 digit telephone number, could print all possible combinations of letters that each number could represent. A second part of the question was, what about if this was a 12 digit international number? How would that effect you de...