The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
2answers
60 views

Lambda calculus: Call by value / Call by name (lazy)

Having difficulties deciding which rules to apply on by value / by name evaulation. Say I have: (λz.zz)(λb.b) And I want to evaluate according to call by valute, will the next step be ...
50
votes
13answers
8k views

Why are eval-like features considered evil, in contrast to other possibly harmful features?

Most modern languages (which are somehow interpreted) have some kind of eval function. Such a function executes arbitrary language code, most of the time passed as the main argument as a string ...
-1
votes
3answers
184 views

How are expressions evaluated in Turbo C++?

I was reading about casts in c++ and got confused about how are the expressions actually evaluated. Consider the following code in which var is of type int and after the expression var = (var*10)/10 ...
-1
votes
4answers
375 views

Why do negative numbers evaluate to true in PHP? [closed]

function haha($lol) { if($lol) { echo "plus"; } else { echo "minus"; } } haha(-1) echoes plus. Is it because PHP uses twos complement? Google search wasn't really helpful.
3
votes
2answers
139 views

How to accomplish a task of evaluating editable variables and formulas, using PHP?

Task as defined: User needs to be able to define their own variables and formulas to operate on those variables, to get output based on their inputs. Since formulas and variables and their inputs ...
6
votes
4answers
347 views

How to convert the following node evaluation procedure to a non recursive solution?

I have the following recursive method. It evaluates a node (that represent a logical expression), using deep first search traversal : EvaluateNode(Node node) { bool result; switch(node.Type) ...
1
vote
3answers
531 views

Self-Evaluation: How do I know if I actually have a “good grasp” of OOP? [duplicate]

If I skip the back story and any thoughts I have on this topic, there's really only one question left to ask: How can I find out if I have a "good grasp" on OOP? (I am specifically using PHP, but ...
4
votes
2answers
291 views

Evaluation order of expressions in Clojure?

I'm currently learning Clojure (my first functional programming language), and I'm curious as to its order of evaluation. Here is an example: (take 10 (cycle [1 2 3])) If the cycle expression was ...
1
vote
4answers
316 views

Efficient way of evaluating an array of strings then add to an array in Ruby

I am looking for an efficient way of evaluating an array of strings against a series of rules and then adding them to another array. For example I have an array of strings: something a 1234 #gohere ...
4
votes
5answers
575 views

What's the effect of this assignment (whatever the language)?

I think my book (Programming Languages: Principles and Paradigms) is wrong. a is a vector, assume a C-like language: b = 0; a[f(3)] = a[f(3)] + 1; int f(int n) { if(b == 0) { b = 1; ...
8
votes
6answers
2k views

How to evaluate code quality when you're not familiar with the language? [closed]

As a hypothetical, if I were to interview someone for a new PHP developer position when my experience is in .NET, how can I determine if the code sample they've provided me is efficient and of good ...
8
votes
3answers
832 views

Is there a general method to evaluate the optimality of an optimization algorithm?

is there a general method to evaluate the optimality of an optimization algorithm, for example an algorithm solving an otherwise NP-hard or NP-complete problem? The only method I came up so far is ...
0
votes
3answers
2k views

How can I tell bad code from good code? [duplicate]

Possible Duplicate: How Can I Know Whether I Am a Good Programmer? I was looking at some posts on language execution speeds (e.g. whether one Language was faster then another or vice ...
20
votes
11answers
1k views

How is fundamental mathematics efficiently evaluated by programming languages?

As I get more and more involved with the theory behind programming, I find myself fascinated and dumbfounded by seemingly simple things.. I realize that my understanding of the majority of fundamental ...
3
votes
7answers
1k views

Writing better timesheet [closed]

Recently, my company started to require us to fill out a monthly timesheet, writing down everything you do in office. A timesheet contain 29-31 days, depends on the number of days of the month. I ...
8
votes
2answers
2k views

What is a good method to do lightweight architecture evaluation?

I'm familiar with architecture evaluation methods such as the technical Architecture Tradeoff Analysis Method (ATAM) and more business-oriented Cost Benefit Analysis Method (CBAM). However, these ...
47
votes
17answers
3k views

How do managers know if a person is a good or a bad programmer?

In most companies that do programming teams and divisions consist of programmers who design and write code and managers who... well, do the management stuff. Aside from just not writing code, ...
8
votes
3answers
422 views

What's the best way to do a Proof of Concept shootout?

In preparation for a new release of software our company maintains, I've been working on what I believe to be a really good approach to solving our scalability issues. I have every intention of ...