philosophy

What's the point of Perl golf?

Perl golf is a programmers' game which involves solving a problem with the shortest perl program possible. (ie, the winner is the person who completes the round in the lowest number of (key)strokes). ...

The art of programming

I see programming as the meeting-place of creative arts and science. Most of us ... are interested in programming for the fulfillment achieved by creativeness tempered by the rigor of applied science; produce extremely high quality products that we distribute for free (FOSS, as an example); subject ourselves to peer-reviews that few e...

Ironpython Studio forms question

This is a two part question. A dumb technical query and a broader query about my possibly faulty approach to learning to do some things in a language I'm new to. I'm just playing around with a few Python GUI libraries (mostly wxPython and IronPython) for some work I'm thinking of doing on an open source app, just to improve my skills an...

Comb Technology

This question is about the rare case of software that is neither in active development nor moribund. First, why is it so rare for software to ever be finished? It seems "no longer in active development" is often synonymous with "moribund". Second, what are exceptions to this? Donald Knuth's TeX is a famous example. It's been untouch...

What is "Simple"?

I've been thinking about the definition of "simple" for a while now, spurred by things like "Real Simple" magazine, which is essentially a vehicle for advertisements for more stuff to buy that clutter up your life. Some people see doodads, like remote controls, as simplifying your life, while others see the remote control as something ...

How many languages are used in your team?

I've heard two good pieces of advice when it comes to choosing which language to use in a development team. To paraphrase: Use the language you're most familiar with unless you have a compelling reason not to. It'll provide the best return on investment. and Different languages have different strengths. Be fluent in ...

Code Generators or T4 Templates, are they really evil?

I have heard people state that Code Generators and T4 templates should not be used. The logic behind that is that if you are generating code with a generator then there is a better more efficient way to build the code through generics and templating. While I slightly agree with this statement above, I have not really found effective wa...

Should non-public functions be unit tested and how?

I am writing unit tests for some of my code and have run into a case where I have an object with a small exposed interface but complex internal structures as each exposed method runs through a large number of internal functions including dependancies on the object's state. This makes the methods on the external interface quite difficult...

What is "elegant" code?

I see a lot of lip service and talk about the most "elegant" way to do this or that. I think if you spend enough time programming you begin to obtain a sort of intuitive feel for what it is we call "elegance". But I'm curious. Even if we can look at a bit of code, and say instinctively "That's elegant", or "That's messy", I wonder if any...

How much is it fair to assume about implementation when doing big-O calculations?

When programmers versed in a wide variety of languages are discussing the merits of an algorithm expressed in pseudocode, and the talk turns to efficiency, how much should be assumed about the performance of ultimate the language? For example, when I see something like: add x to the list of xs I see an O(1) operation (cons), while so...

where to put page navigation links

I'm wondering what are the benefits of having your top row of 'important' links/buttons on a web page duplicated at the bottom. Traditionally the bottom of forms or pages has been for boring stuff like site maps and privacy information; but; in pages where you scroll down many pages (that wrote funny) it is a pain to have to return to t...

How to determine which controller an action belongs in?

I have two models: releases have many elements, and elements belong to releases. The action I wish to define imports all elements (making copies of them all) from one release into another release. How do I determine if this action belongs as a member action on the releases controller, or a collection action on the elements controller?...

Standard methods of debugging

What's your standard way of debugging a problem? This might seem like a pretty broad question with some of you replying 'It depends on the problem' but I think a lot of us debug by instinct and haven't actually tried wording our process. That's why we say 'it depends'. I was sort of forced to word my process recently because a few devel...

how to store configurations for php app -- xml or ini or db

I've got an app written in PHP, and there are a number of configurable variables. We're implementing a feature where the user can create sets of configurations and easily switch between them. How should I store my configs? as XML? in a .ini file? in multiple .ini files? in a db? What's going to provide the most flexibility if we add fie...

HTML site development: div's vs ul's for navigation and menus

I'm working on developing a Web 2.0 site, and I've been looking at how sites deal with menus and nav-bars. Many sites (like twitter) use UL's whereas sites such as stackoverflow use div's that are ID's containing links. Is there an advantage to not using UL's other than it eliminates some IE bugs? is there an advantage to using UL's? ...

What are Crystal Reports for .NET?

I've heard of "Crystal Reports" for years, but I'm really confused why a small ActiveX type of component that just displays and prints out data from databases (does it?) should be considered a whole product within the VS suite of products. Is it something better, like something for Windows Server that lets you generate report server-si...

How does the philosophy of lean translate to programming?

Our company is espousing lean philosophy into manufacturing and administration, in the vein of The Toyota Way. How can the concepts of waste reduction and continuous improvement be applied to programming and code creation? My focus lately has been just making sure that the code I write is only to support an actual process. I think roo...

chop unused decimals with javascript

I've got a currency input and need to return only significant digits. The input always has two decimal places, so: 4.00 -> 4 4.10 -> 4.1 4.01 -> 4.01 Here's how I'm currently doing it: // chop off unnecessary decimals if (val.charAt(val.length-1) == '0') { // xx.00 val = val.substr(0, val.length-1); } if (val.charAt(val.length...

What is a variable?

What is a variable? This question is important for philosophical reasons. ...

"ID" or "Id" on User Interface

The QA manager where I work just informed me there is a bug in my desktop app due to the sign on prompt being "Operator Id" when it should be "Operator ID". Her argument being that "Id" refers to the ego portion of Freud's "psychic apparatus" and is not semantically correct. Now being an anal engineer (AE) I of course had to go and look...