Stacker Nobody asked about the most shocking thing new programmers find as they enter the field.
Very high on the list, is the impact of inheriting a codebase with which one must rapidly become acquainted. It can be quite a shock to suddenly find yourself charged with maintaining N lines of code that has been clobbered together for who ...
Who uses Macs for cross-platform development?
By cross platform I essentially mean you can compile to target Windows or Unix (not necessarily both at the same time). I understand that this also has a lot to do with writing portable code, but I am more interested in people's experience with Mac OS X to develop software.
I understand tha...
What is the most elegant and simple way to implement a circular list, FIFO style? I'm looking for a solution that doesn't resort to hacks like catching exceptions.
No, this is not for homework.
For a little background, I want to use a circular list within GWT; so using a 3rd party lib is not what I want.
Edit: In order to clarify, I r...
I often find myself trying to come up with good names for complementary pairs of variables; where two variables denote opposing concepts, two participants in some sort of duologue, and so on.
This might be better explained by a counter-example - I maintain an app that prints two graphics as part of a print advertisement. They're stored ...
Note
This is not a REBOL-specific question. You can answer it in any language.
Background
The REBOL language supports the creation of domain-specific languages known as "dialects" in REBOL parlance. I've created such a dialect for list comprehensions, which aren't natively supported in REBOL.
A good cartesian product algorithm is nee...
I remember one of the first applications I worked with, at the beginning of my career was built using Clipper (for those who have not been on the area for long, here's a pointer to the Clipper language, pretty cutting-edge at the time :) ).
Clipper used the same database architecture as dBase did, and databases were stored on regular f...
Where do you draw the line to stop making abstractions and to start writing sane code? There are tons of examples of 'enterprise code' such as the dozen-file "FizzBuzz" program... even something simple such as an RTS game can have something like:
class Player {} ;/// contains Weapons
class Weapons{} ;/// contains BulletTypes
class Bulle...
When should I continue to make derived classes, and when should I just add conditionals to my code?
eg for a missile
class Object;
class Projectile : public Object;
class Missile : public Projectile;
class MissileGuided : public Missile;
Or should I implement that last one in the missile's code?
void Missile::Update()
{
if(homin...
Exactly what the title says. Note, this is not about "subscriptable" objects.
...
What are the “normal” ways to do plug-ins in compiled languages (C#/C/C++/D)? I am specifically interested in language agnostic approaches but language specific is not unacceptable.
For the time being, “compile time” plug in approaches (just include the code or not and everything works) are valid but things that can migrate to a more dy...
There are many skills a programmer could have (understanding the problem, asking good questions, good design skills, etc.).
I think System Debugging skill is incredibly valuable. This general skill of debuggin any technical system (from the batteries being dead in your remote control to signal interference from your neighbor's Ham Radio...
In data processing, I frequently need to create a lookup data structure to map one identifier to another. As a concrete example, let's take a structure which holds a 1-to-1 mapping between a country's 2 character code and its full name. In it we would have
AD -> Andorra
AE -> United Arab Emirates
AF -> Afghanistan
What's a good n...
I'm not exactly sure how to word this question.
I learnt what currying was in the first year of university, and have been using it where applicable ever since.
However, I quite often see on the Internet various complaints that other peoples examples of currying are not currying, but are actually just partial application.
I've not foun...
I've recently searched how I could get the application's directory in Java. I've finally found the answer but I've needed surprisingly long because searching for such a generic term isn't easy. I think it would be a good idea to compile a list of how to achieve this in multiple languages.
Feel free to up/downvote if you (don't) like the...
SQL databases seem to be the cornerstone of most software. However, it seems optimized for textual data. In fact when doing any queries involving numerical data, integers specifically, it seems inefficient that the numbers are getting converted to text and then back to native formats both ways between the application and the database. Th...
Inspired by this question
The choice of which algorithm to use to sort a collection can be made better if we know ahead of time how well sorted a collection is. Is there a way we can measure (or maintain a measurement) of how well sorted the collection is? Can we do this in such a way that the cost of maintaining or measuring how well s...
I need a Linux text editor to replace Textpad 4.7.3 (a Windows nagware app), but all the alternatives I've tried are either bloated or incomplete. Here are the features I find most important, in descending order:
Regex search, mark, and replace (across all open files, even), regex search in directory trees
Tabbed editor with proper key...
Everyday we are faced with programming problems ranging from easy to complex. For me it is important to record that knowledge so that I can find it in the future. The features that I consider that most important is recording ease of use (WYSIWIG would be good), good search capabilities and perhaps hierarchical organization or tags enable...
The fixnum question brought my mind to an other question I've wondered for a long time.
Many online material about garbage collection does not tell about how runtime type information can be implemented. Therefore I know lots about all sorts of garbage collectors, but not really about how I can implement them.
The fixnum solution is act...
I just recently really truly groked dependency injection and the wonder of the Decorator design pattern and am using it all over the place.
As wonderful as it is however, one thing that I've been having difficulty with is naming my decorator classes so I would just like to know what others do. Do you always append the word Decorator? ...