The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
1answer
396 views

Aggregate Root and Lots of Data Efficiency

It's more of a scenario, but it isn't far fetched at all. Let's say I have an Aggregate Root (AR) Warehouse which it's used to manage product stock. The Product itself is an AR in a different bounded ...
2
votes
1answer
270 views

Effective handling of variables in non-object oriented programming

What is the best method to use and share variables between functions in non object-oriented program languages? Let's say that I use 10 parameters from DB, ID and 9 other values linked to it. I need ...
7
votes
2answers
295 views

What is an efficient algorithm for randomly assigning a pool of objects to a parent using specific rules

I need some expert answers to help me determine the most efficient algorithm in this scenario. Consider the following data structures: type B { A parent; } type A { set<B> children; ...
16
votes
5answers
2k views

At what point is asynchronous reading of disk I/O more efficient than synchronous?

Assuming there is some bit of code that reads files for multiple consumers, and the files are of any arbitrary size: At what size does it become more efficient to read the file asynchronously? Or to ...
1
vote
4answers
332 views

When should code favour optimization over readability and ease-of-use?

I am in the process of designing a small library, where one of my design goals is that the API should be as close to the domain language as possible. While working on the design, I've noticed that ...
3
votes
3answers
1k views

Combining multiple events into one action/ Defer refreshing

So in a GUI program I have multiple events that trigger a update of a workspace. This update call is costly so I would want it to not happen very often. A user might pick something from a dropdown ( ...
10
votes
5answers
846 views

Is it ever too early to learn a new language? [closed]

Personal context: I've been learning C++ formally the last 6 months at university. Prior to this I dabbled in JavaScript for a year. Now I am considering learning Python during a month off school. By ...
4
votes
2answers
2k views

Amortized Analysis? (Worst-case Performance Guarantees)

What is Amortized Analysis? And how can it help me achieve worst-case performance guarantees in my programs? I was reading that the following techniques can help the programmer achieve Worst-case ...
1
vote
2answers
149 views

Using replacement to get possible outcomes to then search through HUGE amount of data

I have a database table holding 40 million records (table A). Each record has a string a user can search for. I also have a table with a list of character replacements (table B) i.e. i = Y, I = 1 ...
5
votes
3answers
527 views

Starting on a large project, should I split it into more concise parts?

Background: Currently an intern at a company and working on repurposing older programs (still in use, but for different departments) for use in testing new hardware. The new hardware is different in ...
4
votes
2answers
5k 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 ...
11
votes
6answers
7k 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
434 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
206 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
509 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
549 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
384 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
662 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
418 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
340 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
735 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
694 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 ...
5
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
363 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
1k 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 ...
7
votes
8answers
9k 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
469 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
331 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
370 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 ...
14
votes
7answers
1k 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
286 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
599 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 ...
18
votes
4answers
552 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
632 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
439 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
251 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 ...
9
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
3k 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
4answers
629 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
733 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 ...
6
votes
6answers
603 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
778 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, ...