The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
2answers
3k views

How many make threads to use?

When I (re-)build large systems on a desktop/laptop computer, I tell make to use more than one thread to speed up the compilation speed, like this: $ make -j$[ $K * $C ] Where $C is supposed to ...
3
votes
1answer
1k views

Rails application - how to optimize/reduce database calls when iterating over a collection

What's the best way to optimize a Rails app where you need to pull info from the database for a collection of items? For example, if I am building an online forum system... I would have a number of ...
8
votes
6answers
6k views

Is there any reason to use varchar over text columns in a database?

Is varchar just a remnant from before text came around, or are there use cases where you would want to use a varchar? (Or char for that matter..) (I use Postgres and MySQL (MyISAM) daily, so those ...
3
votes
3answers
420 views

Is case after case in a switch efficient?

Just a random question regarding switch case efficiency in case after case; is the following code (assume pseudo code): function bool isValid(String myString){ switch(myString){ case "stringA": ...
0
votes
2answers
203 views

Using a parser to locate faulty code

Lately I've been working a lot in PHP and have run into an abnormally large number of parsing errors. I realize these are my own fault and a result of sloppy initial coding on my part, but it's ...
0
votes
3answers
433 views

Passing class names or objects?

I have a switch statement switch ( $id ) { case 'abc': return 'Animal'; case 'xyz': return 'Human'; //many more } I am returning ...
14
votes
6answers
539 views

How do you manage projects left over by other employees? [closed]

It happens that some one just leaves the company all of sudden. Now his work needs to be completed and you are being assigned it. Having no idea what was he up to (was it 90% done or 9%), how do you ...
5
votes
5answers
342 views

Alternatives for comparing data from different databases

I have two huge tables on separate databases. One of them has the information of all the SMS that passed through the company's servers while the other one has the information of the actual billing of ...
2
votes
4answers
3k views

How to test a program in an efficient way? [closed]

I know that a writing test case is one of the way to do some programming level testing, but how to test some careless mistake? or how to reduce? For example, a buttonA, should perform ActionA, but ...
4
votes
3answers
2k views

URL Encryption vs. Encoding

At the moment non/semi sensitive information is sent from one page to another via GET on our web application. Such as user ID or page number requested etc. Sometimes slightly more sensitive ...
2
votes
3answers
564 views

Designing a large database with multiple sources

I have been tasked with redesigning, or at worst optimising the structure of a database for a data warehouse. Currently, the database has 4 other source databases (which is due to expand to X ...
2
votes
1answer
386 views

What are some best practices for minimizing code?

While maintaining the sites our development team has created, we have come across include files and plugins that have proven to be very useful to more then one part of our applications. Most of these ...
7
votes
3answers
294 views

Computed Values and Simple Reads - A nagging pain for my Domain Driven Designs!

The problem I continually face is how to deal with computed values driven by domain logic while still working efficiently against the data store. Example: I'm returning a list of Products from my ...
2
votes
2answers
672 views

Efficient Java Programmer [closed]

There's been a buzz in my local tech community about being an 'Efficient Java Programmer' can someone explain to me what is an Efficient Java Programmer? what is their difference between average java ...
3
votes
6answers
631 views

Best way to get programmers to ask for help when they get stuck

What is the best way to ensure that programmers ask for help when they get stuck on a problem, rather than spending too much time trying to figure something out when they've hit a wall? I'm ...
4
votes
7answers
2k views

Efficient coding in Visual Studio (or another IDE), with touch typing

Moving the cursor to another position in code is one of the most frequent actions when coding. I don't write my programs from the beginning to the end, like a letter. However, moving the cursor ...
4
votes
2answers
353 views

How to measure time lost due to environment problems?

I'm trying to determine how we can measure how much time the developers are loosing to poorly managed environment and inefficient ways-of-working. The goals are: Show managment how big the problem ...
0
votes
5answers
918 views

Should speed reading be applied while reading Tech Books [duplicate]

Possible Duplicate: How do people read big technical books? It's a known fact that, Science and Tech readings requires most attention, to at least make sense of what one reads. In the age ...
7
votes
4answers
2k views

Is it a good idea to use something like the Twitter Bootstrap in production?

I'm interning at a new startup, and I've been tasked with designing the front-end of the site. I really, really want to use the new Twitter Bootstrap (http://twitter.github.com/bootstrap/). It's all ...
4
votes
7answers
6k views

What is the best way to INSERT a large dataset into a MySQL database (or any database in general)

As part of a PHP project, I have to insert a row into a MySQL database. I'm obviously used to doing this, but this required inserting into 90 columns in one query. The resulting query looks horrible ...
8
votes
6answers
1k views

What is the biggest support a boss can give to his/her developers?

Buying the best hardware, paying the most precious bonus or reward, treating them politely, provide the opportunity for improvement, etc.? We want to improve the productivity of our development team. ...
28
votes
18answers
1k views

Why companies don't buy developers entertaining instruments? [closed]

Many times when I get tired of development and my mind doesn't really help me any more (at home), I simply do something entertaining and my mind gets free for more hours of work with higher ...
3
votes
8answers
448 views

Wrapping simple statement in a function in java?

I was working on neo4j graph database in java. To get the reference node of this db: GraphDatabaseService graphDb=new EmbeddedGraphDatabase(DB_PATH); Node Root=graphDb.getReferenceNode() I ...
1
vote
2answers
317 views

Is it more efficient to query once for all settings, or query whenever a setting is needed?

For my blog script I have a usergroup and permission system set up. Each user is assigned to a usergroup and I have a long list of permission settings. Both are stored in a MySQL database. At the ...
2
votes
3answers
351 views

How are you setting up re-usable development environments?

I'm trying to come up with a good approach to creating a re-usable development environment such that it doesn't take a couple days to re-build a machine if it starts to sputter and to be able to ...
15
votes
7answers
963 views

How do you program effectively when it takes a long time to simply test your code?

My workflow has always been to write one logical step and then run the program and inspect the output. This process have served me incredibly well for assignments in university. However, as I do more ...
7
votes
2answers
274 views

How can I estimate the lifespan of a line of code?

I'm trying to figure out a way to analyze code longevity in open source projects: that is, how long a specific line of code is active and in use. My current thinking is that a line of code's lifespan ...
7
votes
13answers
557 views

When do you think of efficiency? Before/During/After actually coding?

I've been programming in Java for quite some time and I always find myself doing very little "planning" (I haven't worked on anything HUGE yet, but im no stranger to big projects) and develop ideas ...
19
votes
4answers
532 views

Educational, well-written FOSS projects to read, study or discuss [closed]

Before you say it: yes, this "question" has been asked other times. However, I could not fine many of such questions and not that easily, and those I found had similar results. What I'm trying to say ...
8
votes
1answer
592 views

Subset sum problem is NP-complete?

If I know correctly, subset sum problem is NP-complete. Here you have an array of n integers and you are given a target sum t, you have to return the numbers from the array which can sum up to the ...
2
votes
2answers
418 views

How do we know if a problem is hardest in NP

I read that the definition of NP-complete is : These are the hardest problems in NP. Such a problem is NP-hard and in NP How do we know if a problem is hardest in NP, and no harder problem ...
6
votes
3answers
241 views

NP hard/complete

I have never been very clear on this concept. Please help: At the end of the day, we should want to identify useful problems for which we don't have polynomial solution so far and only have ...
8
votes
6answers
2k views

Are There Any Programming Focused Notebooks? [closed]

I know that engineering paper exists, but are there any companies that make programmer-specific notebooks for notes/pseudo-code/designs? Paper is my preferred way of outlining things, so the addition ...
5
votes
6answers
2k views

Programming languages differences and efficiency, does it matter?

I am fairly new to programming, I have studied in computer science for 3 years at college, but as you know, school is only 2% of what really makes one a fully-fledged programmer. I have a lot of ...
16
votes
6answers
1k views

Importance of learning to google efficiently for a programmer?

This is not a debate on usage of Google being good or bad for programmers. Kindly refrain from doing so in your answers. Most people (a vast majority of who use the Internet) use Google these days. ...
2
votes
3answers
4k views

Why does Java's String class not implement a more efficient indexOf()?

Following the below question on Stack Overflow http://stackoverflow.com/questions/5564610/fast-alernative-for-stringindexofstring-str I got to wondering why it is that java (6 at least) not use a ...
7
votes
5answers
613 views

Interrupting Work Productivity: The Name? [closed]

Certainly it is a productivity killer when a developer is constantly interrupted by other workers, bosses, etc - but it is even worse when the developer is constantly interrupted by his or her own ...
6
votes
11answers
700 views

Effective versus efficient code

TL;DR: Quick and dirty code, or "correct" (insert your definition of this term) code? There is often a tension between "efficient" and "effective" in software development. "Efficient" often means ...
5
votes
6answers
585 views

Why are marketing employees, product managers, etc. deserving of their own office, yet programmers are jammed in a room as many as possible?

I don't understand why many (many) companies treat software developers like they are assembly line workers making widgets. Joel Spolsky has a great example of the problems this creates: With ...
3
votes
7answers
754 views

Source of (programmer) inefficiency [closed]

I am interested to gain a better insight about the possible reasons of personal inefficiency as programmers (and only in programming) due to – simply - our own errors (because we are humans – well, ...
28
votes
7answers
797 views

What arguments are there against easter eggs? Are there any arguments to even support easter eggs?

I'm a bit of a jester so the idea of an easter egg still appeals to me. I have added them in my code before but my group of friends has a running joke of using CTRL-FU to trigger the egg. Now I'm ...
7
votes
11answers
431 views

How to program something with the expectation that it will work the first time?

I had a friend in college who programmed something that worked the first time, that was pretty amazing. But as for me, I just fire up the debugger as soon as I finally get whatever I'm working on to ...
7
votes
9answers
765 views

What's Your Method of not forgetting the end brackets, parentheses

disclaimer: for simplicity sake, brackets will refer to brackets, braces, quotes, and parentheses in the couse of this question. Carry on. When writing code, I usually type the beginning and end ...
47
votes
11answers
6k views

Metric by which to hold developers accountable [duplicate]

I asked a question on lines of code per hour and got torn a new one. So my matured follow-up question is this: If not lines of code, then what is a good metric by which to measure (by the ...
41
votes
10answers
2k views

Is there any hard data on the (dis-)advantages of working from home? [closed]

Is there any hard data (studies, comparisons, not-just-gut-feel analysis) on the advantages and disadvantages of working from home? My devs asked about e.g. working from home one day per week, the ...
16
votes
4answers
16k views

Is Python Interpreted or Compiled?

This is just a wondering I had while reading about interpreted and compiled languages. Ruby is no doubt an interpreted language, since source code is compiled by an interpreter at the point of ...
16
votes
5answers
7k views

How to slow down your computer (for testing purposes)?

As most people agree, encouraging developers to make fast code by giving them slow machines is not a good idea. But there's a point in that question. My dev machine is fast, and so I occasionally ...
4
votes
2answers
466 views

Developing With Ruby/Rails Easier, Faster Than Developing With PHP/CakePHP?

What is your experience when developing web applications using one of these two languages/frameworks? Which have you found to be more convenient and faster to develop with?
121
votes
27answers
7k views

What are the worst false economies in software development?

What are the worst false economies (that is ways of saving money that ultimately cost more than they save) prevalent in the software industry and how do you combat them?