language-agnostic

Beginning TDD - Challenges? Solutions? Recommendations?

OK, I know there have already been questions about getting started with TDD.. However, I guess I kind of know the general concensus is to just do it , However, I seem to have the following problems getting my head into the game: When working with collections, do will still test for obvious add/remove/inserts successful, even when based...

How to mentor a junior programmer

Does anyone have any suggestions on how to mentor a junior programmer ? If you have mentored someone did you follow any process or was it quite informal ? If you've been mentored in the past what kind of things did you find most helpful ? ...

How do you include a webpage title as part of a webpage URL?

What is a good complete Regex or some other process that would take "How do you change a title to be part of the url like Stackoverflow?" and turn it into "how-do-you-change-a-title-to-be-part-of-the-url-like-stackoverflow" that is used in the smart urls? The dev environment is I am using is Rails but if there are some other platform sp...

How would you implement a hashtable in language x?

The point of this question is to collect a list of examples of hashtable implementations using arrays in different languages. It would also be nice if someone could throw in a pretty detailed overview of how they work, and what is happening with each example. Edit: Why not just use the built in hash functions in your specific languag...

What's a good natural language library to use for paraphrasing?

I'm looking for an existing library to summarize or paraphrase content (I'm aiming at blog posts) - any experience with existing natural language processing libraries? I'm open to a variety of languages, so I'm more interested in the abilities & accuracy. ...

What is a language binding?

My good friend, Wikipedia, didn't give me a very good response to that question. So: What are language bindings? How do they work? Specifically accessing functions from code written in language X of a library written in language Y. ...

How can I measure the similarity between two images?

I would like to compare a screenshot of one application (could be a Web page) with a previously taken screenshot to determine whether the application is displaying itself correctly. I don't want an exact match comparison, because the aspect could be slightly different (in the case of a Web app, depending on the browser, some element coul...

Browser-based game - Which framework to choose?

I'm starting to develop a browser-based game (and by this I mean text-based, no Flash or similar stuff on it) and I'm struggling to decide on which development framework to use. As far as requirements are concerned, the most important thing that I can think of right now is the ability to translate it to several languages. A good object-...

Most efficient implementation of a large number class

When doing calculations on very large numbers where integral data types such as double or int64 falls short, a separate class to handle such large numbers may be needed. Does anyone care to offer an efficient algorithm on how best to do this? ...

Your favourite algorithm and the lesson it taught you.

What algorithm taught you the most about programming or a specific language feature? We have all had those moments where all of a sudden we know, just know, we have learned an important lesson for the future based on finally understanding an algorithm written by a programmer a couple of steps up the evolutionary ladder. Whose ideas and...

Rewarding code projects for *complete* beginners

Courses for people who are being introduced to programming very often include a code project, which I think is a nice way to learn. However, such projects often feel too artificial, and are thus not very rewarding to work on. What are your ideas of rewarding code projects? (Preferably easy to begin, and extendable at will for the more a...

What's the difference between programmer and software engineer?

As I was looking through some job offerings I saw that many of them require a software engineer, some a programmer and some a developer. Is there any difference between a programmer and a software engineer? Or are they all looking for the same guy that can "write code"? ...

Getting parts of a URL (Regex)

Given the URL (single line): http://test.example.com/dir/subdir/file.html How can I extract the following parts using regular expressions: The Subdomain (test) The Domain (example.com) The path without the file (/dir/subdir/) The file (file.html) The path with the file (/dir/subdir/file.html) The URL without the path (http://test.exam...

What makes a language Object-Oriented?

Since debate without meaningful terms is meaningless, I figured I would point at the elephant in the room and ask: What exactly makes a language "object-oriented"? I'm not looking for a textbook answer here, but one based on your experiences with OO languages that work well in your domain, whatever it may be. A related question that mig...

Simple programming practice (Fizz Buzz, Print Primes)

I want to practice my skills away from a keyboard (i.e. pen and paper) and I'm after simple practice questions like Fizz Buzz, Print the first N primes. What are your favourite simple programming questions? ...

Features common to all regex flavors?

I've seen a lot of commonality in regex capabilities of different regex-enabled tools/languages (e.g. perl, sed, java, vim, etc), but I've also many differences. Is there a standard subset of regex capabilities that all regex-enabled tools/languages will support? How do regex capabilities vary between tools/languages? ...

Simple password encryption

What is a good, simple encryption scheme for protecting passwords in a database? I don't necessarily need anything that's hyper-secure nor do I need anything that's lightning fast, but those things would be nice. Primarily, I just want something that's easy to implement without being terribly slow or insecure. ...

Best non-development book for software developers

What is the best non software development related book that you think each software developer should read? Note, there is a similar, poll-style question here: What non-programming books should programmers read? Update: Peopleware is a great book, must read, no doubt. But it is about software development so does not count. Update: We...

How to detect duplicate data?

I have got a simple contacts database but I'm having problems with users entering in duplicate data. I have implemented a simple data comparison but unfortunately the duplicated data that is being entered is not exactly the same. For example, names are incorrectly spelled or one person will put in 'Bill Smith' and another will put in 'Wi...

Best way to fetch an "unstandard" HTML tag

I'm trying to fetch some HTML from various blogs and I've noticed that different providers use the same tag in different ways. For example, here are two major providers that use the Generator differently: Blogger: <meta content='blogger' name='generator'/> (content first, name later and, yes, single quotes!) Wordpress: <meta name="gene...