This tag is for questions that aren't specific to a programming language or environment.

learn more… | top users | synonyms

23
votes
5answers
1k views

Beginner's guide to writing comments?

Is there a definitive guide to writing code comments, aimed at budding developers? Ideally, it would cover when comments should (and should not) be used, and what comments should contain. This ...
58
votes
12answers
4k views

Why don't we store the syntax tree instead of the source code?

We have a lot of programming languages. Every language is parsed and syntax checked before being translated into code so an abstract syntax tree (AST) is built. We have this abstract syntax tree, why ...
14
votes
5answers
808 views

Why am I seeing so many for(;;) constructs? [closed]

To my way of thinking, a for loop is used to iterate over a known or determinable range. String[] names = //something; for ( int i = 0; i < names.length; i++ ) { //do stuff } which is equivalent ...
6
votes
5answers
2k views

Becoming a polyglot programmer

I know a few programming languages. The most marketable ones being Java, Javascript, as well as non-trival stored procedures. I also know some Python, Actionscript and a few dinosaurs language. I ...
9
votes
4answers
610 views

Using “catching exceptions” to improve readability, Good or Bad?

In the section When to Use Exception in The Pragmatic Programmer, the book writes that instead of: retcode = OK; if (socket.read(name) != OK) { retcode = BAD_READ; } else { ...
5
votes
5answers
9k views

How long would it take for someone completely new to programming to get enough knowledge to make it to the job market as a junior programmer?(C#) [closed]

I just want to know how long would it take me to become proficient enough (in let's say C#) in order to be able to get into the job market as a junior/entry level programmer. I have read all those ...
67
votes
16answers
4k views

What is the/Is there a right way to tell management that our code sucks?

Our code is bad. It might not have always been considered bad, but it is bad and is only going downhill. I started fresh out of college less than a year ago, and many of the things in our code puzzle ...
13
votes
7answers
1k views

Why don't more languages support recursive/nested comments? [duplicate]

Possible Duplicate: Why do most programming languages not nest block comments? Most languages I've worked with don't have support for recursive/nested comments. Is there any reason why ...
13
votes
4answers
1k views

What is the good explanation of Tennent's Correspondence Principle?

I found myself struggling to see what is this principle about and why is it so important for language design. Basically, it states, that for every expression expr in language should be exactly the ...
7
votes
4answers
1k views

what is a good way to show mysql experience?

As always, if this is a duplicate question that I have yet to uncover, please feel free to close or delete it. I'm attempting to get into the programming industry. I've focused mainly on PHP due to ...
16
votes
13answers
256 views

How to name parts of your program as a non native English speaker [duplicate]

Possible Duplicate: Do people in non-English-speaking countries code in English? I am from the Netherlands and we speak Dutch. I have worked on quite a few projects now in various ...
6
votes
3answers
182 views

Is it bad practice to define/use “Preset” functions

Lets say I have an extremely robust and versatile function: void DoAnything(action, target, context) In my program, 90% of the time I call this function, it's with the same parameters: ...
3
votes
6answers
340 views

Multiple projects - similar platforms or as different as possible?

When working on multiple projects simultaneously (for the sake of simplicity let's say half time each on two projects), which is better? Should the two projects Use the same language? Same/similar ...
5
votes
7answers
671 views

Server-side event logs through DB or writing to file?

I am developing a web application as well as the API the web application uses. I'm trying to determine whether it is better to log events (to determine the path that leads to an error as well as to ...
19
votes
9answers
663 views

What are good techniques for keeping your place in code?

I understand using bookmarks to remember a single point in your code. However, how does one keep track of the flow of the code they are investigating? Eg: multiple bookmarks and the order in which ...
2
votes
3answers
2k views

Beginning to code with java (No coding experience) [duplicate]

Possible Duplicate: Best Java book you have read so far I want to learn java but, I have absolutely no coding experience. what is the best website, book, or anything that is best at ...
20
votes
2answers
3k views

What are the advantages of prototype-based OOP over class-based OOP?

When I first started programming Javascript after primarily dealing with OOP in context of class-based languages, I was left confused as to why prototype-based OOP would ever be preferred to ...
11
votes
2answers
450 views

How does event bubbling generally work and is it synonym to event propagation?

I'm trying to wrap my head around the general workings and principles of event dispatching in event-driven (sub-)systems. Although I have used it on quite a few occasions in for instance Javascript, ...
1
vote
2answers
70 views

Source control approach for plugins?

I'm writing an application and a set of many small plugins—where “many” means dozens and “small” means one or two sources. It's not necessarily going to be possible to divide the plugins into neat, ...
3
votes
5answers
646 views

Controller vs Model: Where do I put the processing of user input?

I'm new to MVC and I'm not using a framework (and I'm not going to). I'm designing my new web application using MVC. I have the user input received in Controller. Suppose I have form data and an ...
14
votes
4answers
2k views

Is code like this a “train wreck” (in violation of Law of Demeter)?

Browsing through some code I've written, I came across the following construct which got me thinking. At a first glance, it seems clean enough. Yes, in the actual code the getLocation() method has a ...
1
vote
2answers
210 views

What it is a data structure of a certain type called?

I'll try to keep this as much language agnostic as I can but I'll give the examples in C# since I now know how to solve it that language. The question came to mind when I was thinking of how could I ...
3
votes
4answers
108 views

Is it possible to evaluate the efficiency of a testable algorithm against alternative solutions that aren't already built? [closed]

An e-commerce application I used to work on used a decision tree and a rules engine for each node in order to determine if a customer qualified for certain discounts. The problem was that every ...
16
votes
3answers
1k views

Is there any formal research in FizzBuzz Question Effectiveness?

After seeing this question today on variation of the FizzBuzz interview question, as well as seeing other questions related to it around, I have to ask: is there any formal research on how effective ...
1
vote
5answers
304 views

Source code and project documentation requirements for legal agreement

Question What kind of documentation and other artifacts would you expect to get in case of taking over existing Java webapp (probably it uses JBoss Seam framework) made in-house? I would expect to ...
42
votes
21answers
6k views

Is it true that once you learn one language most of the rest come easy?

I was told by someone that I should start with Python and then, once I'm fluent in Python, the rest of the languages will be learned quickly. Is there any truth to this?
9
votes
4answers
398 views

STDOUT and its impurity

I've read a lot of books and articles about functional programming and still ashamed of not being able to understand for sure some very basic concepts. One of the main ideas of functional programming ...
8
votes
2answers
365 views

Reading Blogs for Technology-Agnostic Growth [closed]

Part of improving yourself as a developer is to read widely. Reading within your technology of choice is a great way to become more proficient in the area you work in regularly. But what kind of ...
7
votes
2answers
153 views

Guess if a time is AM or PM

I'm currently in the process of writing a human date parser. By human date, I mean it should be able to interpret strings as "tomorrow at 2" and return a valid date depending on the current time. The ...
4
votes
3answers
87 views

Removing elements of an 'at least one' association

let's assume - regardless from technology and programming languages - you have a type and the type has an association to another type. This association has the complexity of 'at least one' (1..n). How ...
15
votes
4answers
2k views

Is Java instanceof operator considered reflection, and what defines reflection?

I had a discussion with a coworker today, whether usage of using the Java operator instanceof is a kind of reflection. And the discussion quickly evolved into what actually defines reflection. So, ...
6
votes
5answers
308 views

Does project architecture have a strong relation to used libraries?

Programmers, when it comes to talk about popular patterns in enterprise applications, preach that you should code against interfaces to remove strong relations between components; doing this will aid ...
1
vote
3answers
333 views

Is an assocative array ordered?

An associative array has many common similar names, hash, keymap, map, table, index. It's a map of keys and values but I cannot find a reputable definition of the phrase which tells me whether a map ...
17
votes
4answers
610 views

Would it be ethical to create an open source alternative to the software you've been hired to create?

Say you were hired to create education software that will be sold to students of a particular academic institution. You are the only developer working on this project and have written all of the code. ...
2
votes
1answer
255 views

Is a partially familiar scripting language desirable?

Given that a program (under development) needs a scripting language, and that for various reasons it's not possible to use an off-the-shelf one as is, I'm considering basing it on the syntax and some ...
1
vote
5answers
542 views

Diagramming large and complex application code

I tried creating a flow chart of a function that I use in my program, but there are a lot of conditional statements in between every process and the diagrams are getting more confusing. Is there a ...
2
votes
1answer
197 views

why is it easy to break verification images if they are not distorted to the extent that humans can get them wrong too?

I don't understand why people like to say "Images had to be distorted otherwise they would be easily cracked". I'm talking about those verification images that we had to type to identify that we are ...
25
votes
3answers
930 views

Are static classes with static methods considered SOLID?

SOLID includes the Liskov substitution princicple which has the notion that “objects in a program should be replaceable with instances of their subtypes without altering the correctness of that ...
0
votes
3answers
317 views

What are some effective ways of helping someone learn a programming language/framework in a focused way?

Here's some background: I have someone who is motivated to help me out on a project that already has a good chunk of code written The person does not have a CS background, but knows the basics ...
11
votes
8answers
480 views

What is a good code practice of when to make a function/method for small repetitive code segments?

Many times throughout writing larger programs I have questioned after how many copy and pastes does it make sense to put the code into a function or method and what is a good rule of thumb? I have ...
13
votes
9answers
661 views

Rewriting IBM assembler + COBOL in C++

I work as a rental agent / manager for a car rental company that is running on a rental system that was written in 1972. I decided that maybe it was time for an update. For a bit of background, here ...
0
votes
3answers
259 views

Best 3 people development team organization?

A developer of my company was promoted to a new possition that practically manages us developers, and he assigned to 3 people in our team(including me) some big proyects done in Java/Delphi/.NET, the ...
6
votes
5answers
571 views

Do Diversified Skills Foster or Hinder Specialization?

Since I started working I tried to focus on web development, but because of different needs and situations in the companies I worked I have had to work in different areas (Back-end, Database, etc...) ...
9
votes
14answers
1k views

How do you keep all those languages straight in your head

I know Java, C#, C++. I have used Perl, and am picking up Python and Actionscript 3. This is certainly a path others have trodden, so I am asking how do you keep all these languages straight in your ...
6
votes
3answers
4k views

Suggest good book to learn OOP (not related to any programming language) [duplicate]

Possible Duplicate: Suggest an Introductory OO Text for a (smart) non-programmer? I'm searching good book that teaches how OOP works, best practices, patters (I guess, not sure) and other ...
3
votes
2answers
153 views

what exactly is hypertext?

http://en.wikipedia.org/wiki/Hypertext: Hypertext is text displayed on a computer or other electronic device with references (hyperlinks) to other text that the reader can immediately access, ...
11
votes
9answers
829 views

Learning the rules of chess

A similar question asks whether a computer can learn to play optimally in chess by analyzing thousands of games. If a machine can look at the state of the board for a few games of chess (or a few ...
6
votes
5answers
561 views

Which language should I use for a computationally intensive program? [closed]

This is a multi-part question. I am writing a computationally intensive program that will perform computations on very large numbers, on the scale of factorial(100) . I'm considering using Java or C++ ...
53
votes
17answers
4k views

How to train yourself to avoid writing “clever” code?

Do you know that feeling when you just need to show off that new trick with Expressions or generalize three different procedures? This does not have to be on Architecture Astronaut scale and in fact ...
3
votes
4answers
797 views

Can the strategy pattern be overused?

Example: A file, representing a serialized version of an object, needs to be read and deserialized. It would simple to implement this if we only cared about a single serialization format, but many ...