programming-languages

Programming language that supports inheriting value types

I develop in C++, and sometimes I wish I could say something like this: class Heading : public float // this line won't compile { public: Heading( float const value_ ) : float(value_) // this line won't compile { assert( value_ >= 0.0f ); assert( value_ <= 360.0f ); } }; Instead, I have to do something...

Most Common Mistake done/seen in C++

Possible Duplicate: What C++ pitfalls should I avoid ? What is the most common mistake in C/C++programming that you keep committing or see most of the people do? Being aware of it atleast subconsciously will increase my or anyone's chances of committing it. ...

Algorithm to select 1 of 2 Items Based on Probability

I'm coding a project that generates two arrays containing data. One array contains data for a specific country and the other contains data for all countries. For example, if a user from the US makes a request, we will generate two arrays with data. One with data only for the US and the other with data for worldwide, including the US. I ...

Impact of learning a new language on productivity

Are there any scientific studies (and conclusions) about the impact of mastering a new programming language over previously learned programming languages? I'm particularly interested if mastering various languages can decrease average productivity. ...

Best explanation for Languages without Null

Every so often when programmers are bitching about null errors/exceptions someone asks what we do without null. I myself have some basic idea of the coolness of option types but I don't have the knowledge or languages skill to best express it. It would be useful if someone could point to or write an GREAT explanation of The undesirab...

Collection Initialization Syntax, what for?

We just can use function like public static List<T> New<T>(params T[] items) { return new List<T>(items); } and more important it's better var list = new List<int> {1,2,3}; var list = List.New(1,2,3); So, when we really need to use it? Dictionary public static Dictionary<T, K> New<T, K>(T key, K value) { return new Dictio...

need help writing a program

I am taking a class in microprocessing, and having some trouble writing a program that will hold a value in a port for two seconds before moving on to the next port. Can any one help this make more sense? I have thought of using NOP but realized thats a bit unrealistic, I have tried ACALL DELAY but for some reason its pulling up as an u...

snprintf overflows and prints garbage to file randomly. help

Here is my code, basically one the 4 computer I have tested it on they all work perfectly with very large data sizes, eg textfiles up to 500mb in size, but when I run them on the server with real data even files as small as 6mb seem to overrun somewhere and writes garbage to the end of my files. Here is the source of the entire function...

Which Language for IE Addons/Toolbars C#, VC++ or VB

Is programmers a better place for this question? Am a PHP developer. Want to develop some addons for IE for personal use. Which language should I learn? ...

Programming languages where indexing starts at 1?

Possible Duplicate: List of 1-indexed programming languages? Besides AWK, are there other programming languages where indexing starts at 1 instead of 0? ...

Best programming languages to learn now?

Hello, I currently have been learning and coding a lot with html and css. I'm not sure if I should get into php or javascript. I heard if you get into javascript it's very hard to then learn php. I might even learn python or lisp? After I learn the web languages I would like to go to something like c and objective c and maybe even get i...

Language or package for drawing geometric diagrams

I am looking for a language, or package in an existing language, that is good for specifying and drawing geometric diagrams. For example, I would like to draw a hexagonal grid, with its dual triangular grid superimposed on it. Now, I could sit down, put some elbow grease in to work out the trig by hand and come up with some Postscript o...

Grammar, language, are we closer to real spoken languages?

As a developer I had to jump from a programming language to another. They all still have something in common. But after that I started to look at a Spanish grammar book, and there were plenty of terms I knew in Computer Science classes. After that I read a little about Semantic web, and so on and so forth. Do you consider there are more...

Recursion overhead -- how serious is it?

Possible Duplicate: Is recursion ever faster than looping? I was first trained to program seriously in C, about 15 years ago. My employer wanted highly optimized code for computationally difficult tasks. I remember being advised more than once to rewrite recursions as loops, even at the expensive of readability, in order to ...

What will a Python programmer gain by learning Ruby?

I am going to be learning Ruby, Haskell and Prolog at university. Now, I'm wondering what should get most of my attention. I have half a year to do all three, which means I need to decide on one language to get my extracurricular time. The others I will learn just enough to do very good in the course. I am familiar enough with Haskell a...

Searching systematic, comprehensive and complete comparison between the syntax of VB.NET and C#

I’m an experienced VB.NET developer, who wants to start with C#. I’m searching for a web based comparison between both languages syntax as quick reference. I found myself arranging VB.NET syntax templates such as... Public MustInherit Class BaseClass Public MustOverride Sub PublicMustOverrideSub(ByVal byValParam As Integer, ByRef b...

Web Development - What should I learn to get a good job?

Hello, I'm finishing up my Computer Science degree within the next year. For the past couple of years I've been doing Web Development on a freelance basis. I'd really like to be able to get a decent job doing Web Development after school. My "professional" experience so far has been with PHP, MySQL, and various frameworks. I live in t...

How do I design and implement a programming language?

This question is related to This question on Aardvark This question on here The past couple of years I've been thinking about things I like and don't like about languages I use. I always wanted to write my own language, but never did so. I also own both the Lego RCX and NXT, but most of the time I never actually make my robots do an...

What would make you try (or not try) a new programming language?

I've been designing a pragmatic programming language for 5 or so years, and it probably won't be released for several more years (probably until after my current and next startups succeed or fail). In the mean time, I have two questions that may prove interesting: 1) What attributes of a new programming language could entice you try it...

What's the meaning and use of "res" in function arguments?

Hi, here's a short question that my googling failed to deliver any clues on. It seems to be pretty commonplace to use the word "res" for one of the indexes in function arguments. Its existence appears to be agnostic to whatever programming language you look at. What does it stand for? A simple guess would be, "resource", perhaps? If th...