language-agnostic

What do you do when you're learning a new programming language?

When you decide to learn a new language what do you do? I tend to do a small amount of reading about said language then write a few simple "standard" programs -- typically raytracers and parsers because they're what i'm conceptually familiar with -- so that a can get a feel for the language and learn to use it without having to think ab...

What programming language construct do you find the most useful?

Before I started branching out and learning other languages, I naively believed I could get by with the features Java provided. Since learning Ruby and some other languages that are very different from Java, I have found that there are some really powerful language features that I miss a lot when I go back to Java. I am curious, what a...

How to encourage someone to learn programming?

I have a friend that has a little bit of a holiday coming up and they want ideas on what they should do during the holiday, I plan to suggest programming to them, what are the pros and cons that I need to mention? I'll add to the list below as people reply, I apologise if I duplicate any entries. Pros I have so far Minimal money requ...

Input Validation - What are some top issues to look out for, and lessons you have learned?

When working on applications that are heavy on user input, or even ones that are not; what are the biggest issues that you have encountered? What are the steps that you generally take to ensure that the input is real and accurate? What are some lessons that you have learned in regards to input validation that you wish you had known about...

What is the prefered style for single decision and action statements?

In the case of languages that support single decision and action without brackets, such as the following example: if (var == true) doSomething(); What is the preferred way of writing this? Should brackets always be used, or should their usage be left as a preference of the individual developer? Additionally, does this practice dep...

Automation - what's your tipping point ?

If you're doing some textual manipulation of a file/files, at what point do you decide to automate the process (using your favorite scripting language or writing a macro in a tool) ? Is it after a certain number of repetitions or based on the likelihood you'll need to repeat the process ? Is it productive to automate a task if creating...

Do you use design patterns?

What's the penetration of design patterns in the real world? Do you use them in your day to day job - discussing how and where to apply them with your coworkers - or do they remain more of an academic concept? Do they actually provide actual value to your job? Or are they just something that people talk about to sound smart? Note: For...

Useful math for programmers

In your experience as a practicioner, what's the most useful math knowledge for a programmer? If "it depends", what's your field of expertise and what do you need there most as far as math is concerned? Can you point to any learning material for a beginner? ...

Singletons: good design or a crutch?

Singletons are a hotly debated design pattern, so I am interested in what the Stack Overflow community thought about them. Please provide reasons for your opinions, not just "Singletons are for lazy programmers!" Here is a fairly good article on the issue, although it is against the use of Singletons: scientificninja.com: performant-si...

Access to global application settings

A database application that I'm currently working on, stores all sorts of settings in the database. Most of those settings are there to customize certain business rules, but there's also some other stuff in there. The app contains objects that specifically do a certain task, e.g., a certain complicated calculation. Those non-UI objects ...

Resources for getting started with web development?

Let's say I woke up today and wanted to create a clone of StackOverflow.com, and reap the financial windfall of millions $0.02 ad clicks. Where do I start? My understanding of web technologies are: HTML is what is ultimately displayed CSS is a mechanism for making HTML look pleasing ASP.NET lets you add functionality using .NET(?) Ja...

Most elegant, amusing or strange code one liners

As an example I offer this, which was used to clear the screen in COBOL. DISPLAY SPACES UPON CRT ...

What is boxing and unboxing and what are the trade offs?

I'm looking for a clear, concise and accurate answer. Ideally as the actual answer, although links to good explanations welcome. ...

Interpreted languages - leveraging the compiled language behind the interpreter

If there are any language designers out there (or people simply in the know), I'm curious about the methodology behind creating standard libraries for interpreted languages. Specifically, what seems to be the best approach? Defining standard functions/methods in the interpreted language, or performing the processing of those calls in the...

What "already invented" algorithm did you invent?

In my question Insert Update stored proc on SQL Server I explained an efficient way of doing an insert/update - perhaps THE most efficient. It's nothing amazing but it's a small algorithm that I came up with in a mini-Eureka moment. Although I had "invented" it by myself and secretly hoped that I was the first to do so I knew that it had...

How to get started with speech-to-text?

I'm really interested in speech-to-text algorithms, but I'm not sure where to start studying up on them. A bunch of searching around led me to this, but it's from 1996 and I'm fairly certain that there have been improvements since then. Does anyone who has any experience with this sort of stuff have any recommendations for reading / sou...

Do you have any recommended code-snippets for Microsoft Visual Studio?

What are some macros that you have found useful in Visual Studio for code manipulation and automation? Since good code can be useful in all languages, this question is not language specific. ...

How can I convert all line endings to CRLF, LF, or CR during SVN operations

So, you are all ready to do a big SVN Commit and it bombs because you have inconsistent line endings in some of your files. Fun part is, you're looking at 1,000s of files spanning dozens of folders of different depths. What do you do? ...

Programming Glossary

As I browse through the site, I find a lot of terms that many developers just starting out (and even some advanced developers) may be unfamiliar with. It would be great if people could post here with a term and definition that might be unknown to beginners or those from different programming backgrounds. Some not-so-common terms I've ...

What are your favorite "learning" projects, and why?

When learning a new language/framework, are there any projects you find particularly useful to get to know it in depth? How do the different language paradigms affect your choice of project? Maybe you have a pet project which is '10 lines in functional language x" that you like to implement as a much larger imperative language project ju...