language-agnostic

2d geometry drawing tool

I'm looking for some tool/library that is able to draw simple 2d geometries from text file or programatically. I already found List of interactive geometry software but that not quite what I'm looking for. I would prefer something more similar in usage to graphviz or gnuplot. I already wrote some scripts for gnuplot but this tool has bee...

Why doesn't a string builder exist everywhere?

I sort of understand the motivation for a String Builder class, but do all languages have one? Should they? I'm thinking specifically of PHP, Perl, Python, and Ruby. I know C# and Java do. If the others don't, why not? Do they not suffer from the same implementation problem? Or do they not care? ...

Pros and Cons related to Pair Programming

Our company has gone through some changes and the new CIO wants to present a case to the other boss about pair programming. I do not have any experience (zip, zero, zilch, nada) with pair programming (which makes this presentation much more FUN). What parts would you highlight in a presentation to upper management? How is this diffe...

How can I find only 'interesting' words from a corpus?

I am parsing sentences. I want to know the relevant content of each sentence, defined loosely as "semi-unique words" in relation to the rest of the corpus. Something similar to Amazon's "statistically improbable phrases", which seem to (often) convey the character of a book through oddball strings of words. My first pass was to start ma...

Class Diagrams - questionably useful?

How is a class diagram actually any different to just looking at the class definition with all the functions collapsed? I've been asked to write some and realized that this is all just .. read the source .. it has comments. What's the point of a class diagram, how is it different to even minorly commented definitions, and what makes a go...

How would one write a private/public key system for a server authentication?

Hi all, I guess this might have been posted somewhere, I did search, but couldn't find anything. I have this server on which I run a game server, and where I want to have some TCP server (possibly written in Ruby) that will provide a pseudo-session with few commands available (like restart the game server, send the logs, etc.) What I ...

Do encoded URLs have better SEO than slugs?

I can't think of an example, but hopefully you get the idea. Encoded URLs have some characters replaced with those weird %20% type of codes (so I think none of the original characters/meaning is lost) whereas slugs have all the special characters stripped off and white spaces replaced usually with dashes or plus sign ('-' or '+'). ...

Detect physical screen dimensions

I know that it is possible for a website to detect a user's screen dimensions in pixels, but is there a way to detect the physical size of a user's monitor (in inches)? ...

How to efficiently identify a binary file

What's the most efficient way to identify a binary file? I would like to extract some kind of signature from a binary file and use it to compare it with others. The brute-force approach would be to use the whole file as a signature, which would take too long and too much memory. I'm looking for a smarter approach to this problem, and I'...

Don't you sometimes hate the way the "m" character looks in your code?

We all write code using monospaced fonts and the "m" character often (depending on the character combination) looks awful in monospaced fonts. There are other characters that tend to look bad but "m" has the worst reputation in my book. I'm curious if anyone agrees with me on this. ...

Common pseudocode questions, puzzles and challenges

Hi, I am looking for examples of pseudocode problems that you may have been asked in an interview or been asked to represent as part of your job or education. I'm not looking for examples from any domain in particular, so it can be related to design patterns, algorithms, data structures, caching strategies, anything to do with Software ...

Can a programming language itself be copyrighted?

I know that softwares can be copyrighted, and then you cannot copy them (as in copy the source), so you need to buy them. For example - Microsoft Visual Studio is a copyrighted IDE. But, that doesn't make C++, for example copyrighted. So, Microsoft does not own C++. Anybody can a) use C++, b) write compilers for C++, and c) sell applica...

Order-issuing neural network?

Hello. I'm interested in writing certain software that uses machine learning, and performs certain actions based on external data. However I've run into problem (that was always interesting to me) - how is it possible to write machine learning software that issues orders or sequences of orders? The problem is that as I understand it...

read-only access to a pdf file in LAN

Is it possible to serve a read-only pdf file to multiple computers in a local area network. say for example a library has one copy of an e-book. the library has multiple computers and the ebook is stored in a server. students are then to read the ebook simultaneously at the client units. Ff it is, what solutions are available programmin...

Are the terms "URL" and "path" interchangeable?

If you think they are not, please give an example for a string that can be called "URL" and not "path" and one that can be called "path" and not "URL". ...

Which existing language features are the most difficult to implement and why?

Looking at some language features I sometimes wonder how on earth would someone implement a functionality like this. So my question is, which of the numerous existing language features are the hardest to implement? An explanation why is it so is most welcome (maybe even required?). To maintain order, please only one feature per post. ...

Is there any reason to have interfaces for very basic data objects?

In writing my current project, I have created interfaces for all of my objects. I thought that this was considered good coding practice. I've basically ended up with a bunch of interfaces which define pretty trivial classes. Eg: public interface IUser { int Id { get; } string DisplayName { get; } } I don't really see any po...

Rectangle physics and collisions

Hi, im currently trying to figure out how to develop a method in my program that takes care of the forces and updates the positions of the rectangle after collision with a wall. At the moment, i just have it moving inside the walls. i know the equations of motion in terms of acceleration and understand they need to be integrated in the R...

What criteria do you use when deciding to add a language (Java, C ... ) to your resume?

How do you decide when a new language you're picking up is ready to go on your resume? ...

Rapid prototyping and development of business applications.

Thirty years ago, when I began to design and develop CRUD business applications, I envisioned that as time moved on, designing, prototyping and customizing business applications would become easier and more streamlined. In 1983, I discovered a simple, easy-to-use RDBMS called INFORMIX which enabled me to quickly define schemas, generate ...