programming-languages

Is there any object-oriented static typed language with variables with few types?

I like reading about programming theories, so could you tell me if there is any object-oriented static typed language that allow variables to have a few types? Example in pesudocode: var value: BigInteger | Double | Nil I think about way of calling methods on this object. If object value have type BigInteger | Double language could al...

How do you get a css box to extend the entire width of the browser window?

For example, if you look at Facebook, they have a short blue bar on top that extends the entire width of the browser. I thought about using width:100%; but I know that it needs to have a parent element to be able to do that. ...

Cannot create apply function with static language?

I have read that with a statically typed language like Scala or Haskell there is no way to create or provide a Lisp apply function: (apply #'+ (list 1 2 3)) => 6 or maybe (apply #'list '(list :foo 1 2 "bar")) => (:FOO 1 2 "bar") (apply #'nth (list 1 '(1 2 3))) => 2 Is this a truth? ...

What are some highly-regarded books on (modern or historic) programming language design?

I greatly enjoyed Douglas Crockford's recent lecture series, particularly the talk which covered the history of programming languages. I'd like to learn about this subject in more detail. Consider this question language agnostic. I'm not interested in books that teach programming. I'm interested in books which discuss decisions made dur...

Better language feature than exception handling in C++?

(not sure if it's only a C++ thing) Exception handling is hard to learn in C++ and is certainly not a perfect solution but in most cases (other than some specific embedded software contexts) it's certainly the better solution we currently have for exception handling. What about the future? Are there other known ways to handle errors ...

What are the prevention techniques for the Buffer overflow attacks ?

what are the ideas of preventing buffer overflow attacks? and i heard about Stackguard,but until now is this problem completely solved by applying stackguard or combination of it with other techniques? after warm up, as an experienced programmer Why do you think that it is so difficult to provide adequate defenses for buffer ov...

Where to go now?

I'm a web and Linux developer with strong experience in C, PHP and JavaScript. I'd really want to take my skills further and expand into other languages, but I'm not sure what to choose. I've considered Python, as it's very popular and is used to write a surprisingly high number of programs in Ubuntu and seems very useful to write progr...

Help with removing code duplication

Hello Everyone. I am trying to create a little functional programming library for Java (just to scratch my own itch). While defining the higher-order functions for Lists, Sets and Maps I have come across this problem: The functions that take a collection, and return a collection of same type have almost the same implementation, and yet ...

Minimal instruction set to solve any problem with a computer program

Years ago, I have heard that someone was about to demonstrate that every computer program could be solved with just three instructions: Assignment Conditional Loop Please I would like to hear your opinion. I mean representing any algorithm as a computer program. Do you agree with this? ...

Sites for introducing some project ideas

Hi I want to practice my java language with writing codes So I need some sites for introducing me some project ideas(one of subject can be like google search engine)!! thanks ...

Is Java *really* less complex than Scala?

I frequently hear claims that Scala is much more "complex" than Java. Can anyone therefore provide an example of Java code that can't be improved by writing it in Scala, or Scala code that can be improved by writing it in Java (but not by just rewriting within Scala) By "improve", I mean that the code is better with regards to one (or ...

Creating a daemon with stop, start functionality in C

How to add daemon stop, start and report function to this daemon code? #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <unistd.h> #include <syslog.h> #include <string.h> int main(void) { /* Our process ID and Session ID */ pid_t pid, sid...

How worthwhile is it to read Richard Stevens' books?

I recently came across a good book by Richard Stevens, his "UNIX Network Programming, Volume 1, 2nd Edition" (in C), published 1998. I was reading it for the past week & realized while practicing some of the programs, that several methods used in it are not compliant to the standards or have a bit different approach. Also reproducing the...

Which applications are best developed in C++ over C# in today's business?

I'm only curious. I have already developed microcontroller software in C and Assembly. So, I can see an application for these languages. As for today, I'm specialized in information and process systems and even though C++ is object-oriented and offers powerful development capabilities, we mostly develop in .NET C#. So my question is t...

What is the algorithm for counting the number of 1's and 0's in a 16 bit number in lc3 machine language?

Provided adresses: x4000 - address of the input number x4001 - address to store count for 0's x4002 - address to store count for 1's ...

Can Javascript be replaced with another language?

Possible Duplicate: Alternatives to JavaScript Hi there, As there are many programming languages, and you have options, that which ever language you want to work on, like you if you use C# then you have option that you can use VB.NET or C++ etc further you we have Java which can replace C# or C# that can replace Java. So we h...

What characteristics make programmers conceive a language as beautiful?

It seems to me that some languages are generally being conceived as more beautiful than others. This seems to apply to all programming paradigms. Are there any abstract/paradigm-spanning characteristics which makes programmers consider a language as beautiful? Edit: If you think that there is no consensus then please don't hesitate to s...

Is it possible to design a dynamic language without significant performance loss?

Is it possible to design something like Ruby or Clojure without the significant performance loss in many situations compared with C/Java? Does hardware design play a role? Edit: With significant I mean in an order of magnitudes, not just ten procent Edit: I suspect that delnan is correct with me meaning dynamic languages so I changed t...

What are the things necessary to become good technical architect

Hi, I was just curious to know about how to become a good technical architect Or what are the things makes a Developer good architect. Please share your insights and articles. ...

A book on programming in the C# lanuage

Possible Duplicate: Best intermediate level C# reference book I am very new to programming and I am looking for a book that will explain the uses for a loop other than what a loop is used for, if statements, etc. I understand what they are but what I find myself doing is not know what to use where. This might come more with ex...