instruction
stringlengths
34
19.9k
I'm looking for the term that applies to a certain kind of filtering behavior. It's often used in webshop-like interfaces, where large amounts of data are filtered based on a selection of filter criteria. The most distinguishing feature is that it's impossible to pick a filter criterium that leads to no results, as the...
What would be the best approach to achieving private communication between my iOS app and its server component? Is having a single unchanging “secret key” baked into the app source enough, or do I need to set up generations of such “handshake” keys dynamically somehow? The server by itself doesn’t have access to any se...
Possible Duplicate: Hand over source code to customer I have developed a couple of form based windows application in vb.net for a client and they all work well and he paid me through a freelance site. I have handed over the executable and the setup to the client and all was well. Now the client wants the source code ...
What do you think about SCM-based (subrepositories in mercurial, submodules in git) dependencies management? Is it definitely a good way of managing dependencies? Or definitely bad way? Should I prefer some build system (ant/phing/rake) over subrepositories? Some particular example for you to have a context: I have sev...
I know this is kind of time-management question. I do well in short assignments, but fail miserably, when it comes to projects that require hours and hours of work to be done day after day. I cannot code more than 10 minutes, unless there is a deadline. I kinda wander and come back and code. It takes me ridiculously la...
We're implementing an adapter for Jaxen (an XPath library for Java) that allows us to use XPath to access the data model of our application. This is done by implementing classes which map strings (passed to us from Jaxen) into elements of our data model. We estimate we'll need around 100 classes with over 1000 string ...
C# style suggests using CamelCase in identifiers to delimit words. Lisp tradition suggests using-dashes-instead. Has there ever existed a programming language where using spaces in identifiers was not only allowed, but a commonly used idiom when employing multi-word identifiers? It's possible to have identifiers with s...
We've probably all been in the situation where you'd like to alert your team members to some change ("I changed X, so now it's running every hour instead of every day"). But the change is non-urgent, and email can be disruptive - or get tuned out. Anyone have any techniques where the team can have a running log of chan...
I would like to know if it is possible to make an application to be sold on Apple AppStores that is linked (during compilation) to a BSD-licensed library.
Disclaimers (Please read before jumping to answer): I've seen a number of questions similar to the one I would like to ask, so here are some similar questions. IMHO They are neither completely what I'm asking, nor are they as thorough as I hope to be (I don't mean to brush off the answers to the below questions, nor am...
In a interview I was asked, Suppose we are going to create a software that runs on both desktop machines and smartphones. Name a software design pattern that could be used to enable the application to create different classes for display at runtime depending on the platform. I know there are simple solutions to imple...
Generally GC is not a good choice to get a soft real-time attribute. But Erlang is GC based language can be soft real-time. Does it mean Erlang have almost no GC latency? How does it work?
Iam not sure if this topic is ok to ask, but we are talking about this since years in our Developer-"Shop". How to write concepts for Web- Applications? We are using Zend Framework (MVC), OOP Based, Databases, LDAP and such stuff. But no one ive ever meet can show me an good example for some kind of "technical concepti...
I am new to openGL C++ and what I wanted to know is if there was a pre-existing function in the OpenGL library that would allow me to import a 3d or 2d model? For example, if I make a 3d image using photoshop, or a 3d model using 3ds max could I use a library in openGL example (not real function): glUse3dimage(3dmo...
What is the fastest way to find the first (smallest) integer that doesn't exist in a given list of unsorted integers (and that is greater than the list's smallest value)? My primitive approach is sorting them and stepping through the list, is there a better way?
I was thinking, is there a particular time in your coding where you verify that it works? Say, after coding a function, or an entire class, or an entire section of an app, or after every 'significant' block of code? I ask this, because I tend to verify my app too often, sometimes after every 3rd or 4th change. This is ...
I have been working for a couple of months now in a company that estimates (for the general population, not juniors specifically) tasks and then we are given the task, solve it, it goes through two tests and at the end the estimate should be somewhat met. I am beyond stressed because some of the estimates are simply im...
I have just begun development of a web application (that will be deployed using Google app engine), without going into the specifics, the web app will allow users to deploy a small website of their own, part of app allows the users to create a form to allow customers to sign up to the users website, however each user m...
I'm not sure I have the correct verbage in my question, so let me explain: What I mean by "software architectural design": I have (what I believe) is a unique and useful design concept for an architecture that involves multiple clients, shared states, blah-blah, etc. etc. This architecture would be used in multiplay...
If I am not storing credit card info, do I have to be concerned with PCI-compliance? I will be using a payment processor with a bank in my country. Literally just taking the credit card info and passing it to the gateway and processor. I would love to get an idea of the various technologies I might need to consider fro...
This type of conditional statement is generally frowned upon if(condition) statement; because if you add another statement, like this if(condition) statement; statement; it gives the impression that the second statement is part of the if block when it isn't. That said, my IDE does automatic indentation, which I...
I have spent some time studying Django and I've done some applications. But I really don't know what is the best approach while developing an application, I mean, there are several options: Make all the models, then all the urls, the views and then make all the templates. Other people recommend using an agile approach,...
I'm a member of my high school's robotics club, and am responsible for programming the robot. One suggestion I keep hearing from various adults is that I should be writing unit tests to help validate my code. The code base is getting a bit big, and I do agree that unit tests would be really helpful in helping me catc...
I was wondering if I can use a Python script to test a C program automatically. Suppose I have a very simple C program which reads data (numbers as test cases) from the console, calculates them, then outputs it to the console. Now I want to read data from a file then output whatever the program outputs into a file. Sup...
Should catch blocks be used for writing logic i.e. handle flow control etc? Or just for throwing exceptions? Does it effect efficiency or maintainability of code? What are the side effects (if there are any) of writing logic in catch block? EDIT: I have seen a Java SDK class in which they have written logic inside the ...
I work on some iphone/android apps and the “data stored on a centralized server” pattern seem fairly common. So far, I have done one app like this, doing everything myself at a low level without using many libraries: MySQL database PHP/HTML web forms allowing the app manager to enter/update content with some validatio...
I'm currently studying for an examination and one of the sample paper questions is to discuss the limitations of UML. Most of the material I'm finding on the net is relating to a specific UML implementation or language. I'm wondering from a generalists point of view what would you consider the limitations of UML to be?...
I've recently forked a project on Github and made some modifications to it, pushed them back to the forked repository and asked the original developer to pull the changes. (I gather this is the preferred way of contributing on Github.) The project is licensed under GPLv3. I am the author and the copyright holder of the...
Short Version: What is the term/concept which describes the efficient design of programming the data layer for efficient data access and what are some sources/books/articles/website which discuss this concept? Long Version: So I had a recent conversation with the senior developer at my small company about how and why w...
If I am about to develop an Enterprise application, but as far as I understand from agile process, I break features into small chunks and develop them iteratively. I used to create the database and the core of the application first, then I extend these iteratively. The question is: Do I have to keep what I used to do p...
Is there a better way to compute cartesian product. Since cartesian product is a special case that differs on each case. I think, I need to explain what I need to achieve and why I end up doing cartesian product. Please help me if cartesian product is the only solution for my problem. If so, how to improve the performa...
I am building a web app that manipulates fairly complex data: guitar tabs. As a reference, guitar tabs look like this: Eb|-------------------------------------------------------------------------| Bb|-------------------------------------------------------------------------| Gb|--5-5-5-5-----------------------------...
I'm writing something on how iterative Fibonacci is substantially better than recursive Fibonacci - a few lines. The main reason of this I find, as do many prominent researchers I believe, is that you don't recalculate values - space vs time. From this I thought ah ha! caching! But I'm not sure if it is caching, memoiz...
Many software companies preach in their Website Banners: "Global Delivery Model". Has it anything to do with Deployment?
Our app basically is a few forms that are filled out by people.. Then these forms are validated and reviewed and reports are created.. So I was thinking about DI and messing with a simple example of Unity + MVC http://netmvc.blogspot.com/2012/04/dependency-injection-in-aspnet-mvc-4.html So could it be useful for somet...
Background Looking to leverage an existing GIS system for exploring organizational data. Architecture The following figure represents a high-level overview of the system's desired features: The most basic usage would be as follows: The user visits a web site. The system presents a map (having regions, cities, and bui...
I'm using asp.net (c#). I have a factory that uses a dictionary of keys that are mapped to objects types. I originally used a static variable to track the dictionary but realized it would be shared among all sessions. Then I'm left with the idea of passing the object map around everywhere, which seems messy. Should ob...
Disillusionment with the Portal Space I'm seeing a disturbing number of large, enterprise clients who have become disillusioned with their enterprise Portal experience, especially those in the WebSphere Portal Server (WPS) space. Millions have been invested, yet the promise of personalized content with aggregation and ...
I recall back from my days of programming in C that when two strings are joined, the OS must allocate memory for the joined string, then the program can copy all the string text over to the new area in memory, then the old memory must manually be released. So if this is done multiple times as in the case of joining a l...
Is there a language that is capable of developing apps to cross platform OSs (win,*nix) and mobile apps (IOS, android) .. I'm a pro web developer but want to explore more environment to deploy my code into... Python ? Ruby ?
I'm working on a webapp (python/javascript) to modify a game's save file. The file has certain bytes representing player information, such as the gun, the equipment, etc. The idea is to show an interface representing the information in the file, allow the user to make changes, send the data back to the server, which mo...
According to canonical agile development, what is the appropriate amount of learning that an engineer should engage in before implementing a solution to a problem? If an engineer knows she is too ignorant of a given topic (say, compression) to start implementing, she goes and learns what she thinks she needs to know, a...
I'm refreshing my CS Theory, and I want to know how to identify that an algorithm O (log n) complexity. Specifically, is there an easy way to identify it? I know with O(n), you usually have a single loop; O(n^2) is a double loop; O(n^3) is a triple loop, etc. How about O (log n)?
For this question, I'll give an example module to facilitate the discussion, Let's say the module is a calculation engine, It currently servers its purpose for its current audience. The requirement is to clone the same engine but with some tweaking for an entirely new audience. Given that, these are Considerations/Fact...
I have an API that is EJB based (i.e. there are remote interfaces defined) that most of the clients use. As the client base grows there are issues with updates to the API and forcing clients to have to update to the latest version and interface definition. I would like to possibly look at having a couple versions of t...
If data is simple and objects are complex, I'm curious if there are any existing statically typed languages that would be able to augment(?) a map type into a type with guaranteed fields. I realize that at runtime, in any language this type of check is pretty doable. But in theory I also believe this should be possible...
There are some types of bugs which are very hard to reproduce, happen very rarely and seemingly by random. It can happen, that I find a possible cause, fix it, test the program, and can't reproduce the bug. However, as it was impossible to reliably reproduce the bug and it happened so rarely, how can I indicate this in...
It is always stated that it is hard to store applications objects in relational databases - the object-relational impedance mismatch - and that is why Document databases are better. However, is there really an impedance mismatch? And object has a key (albeit it may be hidden away by the runtime as a pointer to memory),...
I'm going to start a side project to build a "single page" web application. The application needs to be real-time, sending updates to the clients as changes happen. Are there any good resources for best-practice approaches wrt the architecture for these kinds of applications. The best resource I've found so far is the ...
I'm trying to build a very small, niche search engine, using Nutch to crawl specific sites. Some of the sites are news/blog sites. If I crawl, say, techcrunch.com, and store and index their frontpage, then within hours my index for that page will be out of date. Does a large search engine such as Google have an algori...
We use TortoiseSVN, but we have no bug tracking system. I know, lame, but beyond my control. There were times when svn wasn't in daily use. Now I've had succeeded in pressing for using it regularly, with proper merging, branching, tagging etc. As you could expect, the number of revisions increased in result, which mak...
The challenge proposed to me as to create a widget to apply in other sites that makes a website compliant with the cookie law[1]. Can I do this without changing server code? I mean, if there's code on server-side that writes an affiliate cookie to the response and my JavaScript widget deletes it after on window.load ev...
Say you have a traditional dev > test > production process say on a monthly release cycle. What are some of the steps you need to take and put into place to move towards a model of continuous delivery with frequent releases per day. Please make one suggestion per response. I would be interested in using voting to indi...
I realised the other day that I don't know how to talk about anonymous methods. It's easy enough to talk about named methods (The X method takes a Y1, Y2 and Y3) and classes (The X class has A, B and C methods), but it's harder with anonymous methods. How does one go about talking (and writing) about them? From the num...
...for project-based work. So far I didn't, and always got paid when work was complete and didn't ran into any problems. Does this make me look unprofessional? :) Should I ask like 25% - 50% advance before I start working? The work I usually do also includes graphic design to some extent (user inteface for my app)
Many of the custom projects I take include things that could be useful to the open source community. I'd like them to open Github repos with them :) Most of them are jQuery plugins. I'm almost always ending up creating my own jQuery plugins for features I need to implement in the project, for example autocomplete, edit...
In the first line of a git commit message I have a habit of mentioning the file that modified if a change doesn't span multiple files, for example: Add [somefunc] to [somefile] Is this a good thing to do or is it unnecessary?
I want to design a software for my musical instrument which is a rhythmic one (there is no melody). All I want these software to do is : make the user able to compose music play what user has composed for that purpose I need to record diffrent sounds of that instrument and match each sign with the appropriate soun...
I have two classes that I want related to each other in an JEE application using JPA2. In an OO world, I would say that a Chatroom has an attribute List messages. In the relational world composition doesn't exist like this. If I weren't involving a database at all, I would definitely code these two things as a composit...
After reading this interesting question, I felt like I had a good idea of which insecure hashing algorithm I'd use if I needed one, but no idea why I might use a secure algorithm instead. So what is the distinction? Isn't the output just a random number representing the hashed thing? What makes some hashing algorithm...
IF a 3 dot vector and a 3x3 matrix can rotate, scale and transform things in a virtual 3D space, could you use a 3x3x3 matrix and a 3.3.3 vector to do something to the games sense of time?
I'm a website owner and I develop in Yii so in short, I think I'm working with more or less the "best" PHP has to offer (e.g. PDO, OOP...etc). My primary website (which is not built in any framework just native PHP) of 2.5 years is finally making enough money I can hire my first employee who I want to be a developer to...
First let me say that I think that an agile process can work because of the following underlying principles: It brings focus Limits the noise which really brings focus Secondly I am wondering what are the initial conditions needed so that an Agile process can succeed? For example do we need to have: No existing bug...
Possible Duplicate: My Dad is impatient with the pace of my learning to program. What do I do? I am 14 and have been studying programming for 4 months now (3 months Python, 1 Month of Ruby). I haven't been pushed by my parents to do it, I took it up on my own. Whenever I try to show something I made to my dad, he sa...
I wrote this code: #include <iostream> int main() { int a; std::cin >> a; if(a*a== 3){ std::cout << a; } return 0; } On MSVC I turned ON all optimization flags. I expected that since a*a can never be 3, so compiler should not generate code for the section: if(a*a== 3){ std::cout << a; }...
I have implemented merge sort and quick sort using C (GCC 4.4.3 on Ubuntu 10.04 running on a 4 GB RAM laptop with an Intel DUO CPU at 2GHz) and I wanted to compare the performance of the two algorithms. The prototypes of the sorting functions are: void merge_sort(const char **lines, int start, int end); void quick_sor...
I have a project where my files have gotten out of hand because of the volume of them. I have started to combine classes of similar types in single header files because you can, and it still is good practice, now can i do the them same for those classes functions, that are declared in the source files. Is it a good id...
I have read somewhere that the cost of resolving bugs increases if it is not resolved at the initial stage. Which approach should I take while creating programs? Divide program development in modules. Complete coding one module. Fix ALL bugs of that module before starting coding other modules. Divide program developme...
Is there currently a way of developing android apps on an android phone? In other words, write, compile, install and run regular android java on the phone without using a pc? If not, what would make it possible, if at all? (would rooting be necessary? Or an android emulator compiled for android?)
I would like to know the ideas that are being used for explaining to the client the limitations of the language used for enhancement of the existing project. Given a scenario was that the project existed in VC++ 6.0 and the client had asked for enhancement that could include transparency (alpha) component in the colo...
General text editors don't change greatly. Syntax highlighting and code collapsing are not big changes really. If an editor is structure or domain aware, this usually comes with a different layouts - treeviews, context-menus, drag-and-drops and so on. So are there good example to add more domain control when editing wi...
We are in a small company with around 10 developers. I am the team leader and responsible for the development process. Supervisors and salesmen are close to us since we are a small team, but have no clue on how software is developed. When they ask me how much time I want for a change (bugfixes/features) in a product, m...
I would like to learn something more about NoSQL databases, so I've chosen to create a new project from scratch to handle football results. In my traditional relational database, I have tournaments, teams, results and class tables. All are obviously related. What might be a good approach for designing a project like th...
Possible Duplicate: What should be the maximum length of function In Java (and I think in other OOP languages too) it is recommended to keep class methods as short as possible. While I understand this recommendation I do not understand what is a "short-sized" method and "large-sized" method. What is a particular cri...
There is an analysis and design phase of the software development life cycle. Should software developers be skilled enough for carrying out the work performed during this phase, such as drawing workflow diagrams, data flow diagrams, ERDs, UML, and other models? I have seen some cases where developers can code very we...
I want to model a file system which contains both files and directories, and directories can contain either files or other directories. This is what I have reached so far: In OOSE book, however, a similar model is presented: Now I have two questions: I wonder why the author did not use an Interface to represent the...
So I'm hiring for a senior developer/team lead role for an ASP.NET MVC3 project. This is a big deal position for our team as this person will lead one of our two main products--a product that hasn't seen much developer love in a while. So I need to ensure that my candidates do smart things with controllers, views, vie...
I posted a c# feature request here; however, I do not get a lot of attention there. Therefore I am asking you here, what you think of it. The in and out keywords in generic type declarations are useful; however, due to their nature, their application is limited to a small number of types. What I am suggesting here, is...
I'm looking at developing some commercial product (sell for money, only binaries, no sourcecodes). I have read up on open source licensing, but I just could not understand if what I want to achieve is possible. Will need some bros to walk me through. Like I mentioned, I looking forward to create a simple commercial pro...
I'm integrating EASTL into my game programming framework. I did some changes to it since I have my own memory management sub-system and now I'm wondering what I need to do to not break the license under which EASTL was released. The source code files include the following notice: Copyright (C) 2005,2009-2010 Electronic...
I have an API library for C# that provides flexible multithreaded task management of objects on task bases. The library was developed extensively for a project that was later cancelled by the client. I received the legal rights to the library, and the client doesn't care what I do with it now. I don't know what to do w...
During times of heavy development, the database schema changes both rapidly and continuously, and by the time our weekly push to the beta build comes around, the schema has changed so much that the only sensible option is to nuke all of the tables I can and copy the new versions from my dev database. Obviously, this is...
I have the task to implement the state pattern in one of my classes. The assignment referenced a suggested implementation, and upon reviewing that implementation I was confused since I believed it to be nonsensical for most applications and frankly simply bad from a design point of view, since it completely dismisses s...
I am planning learning Model-View-Controller (MVC) development using Java. While reading I came across a post which mentions java.util.Observer and java.util.Observable for MVC development. As I never heard of it before, upon more googling I came across this SO post, which discusses some design flaw with the above-ment...
I think the discussion for programmatic service oriented usage vs human interaction is clear. But if I were to create an application that makes use of both a programmatic API and a website that makes use of the data connected by the same API, does it lean the favour towards using only ASP.NET? How easy is it to integra...
Maintainability is a major stake of professional software development. Indeed, maintenance is nearly always the longest part of a software life cycle, as it lasts from the project release until basically the end of times. Moreover, projects being in maintenance represent a large majority of the overall number of projec...
As part of writing an Iterator, I found myself writing the following piece of code (stripping error handling) public T next() { try { return next; } finally { next = fetcher.fetchNext(next); } } finding it slightly easier to read than public T next() { T tmp = next; next = fetcher.fetchNext(next); ...
I'm a developer in large IT company that is centered around providing services to clients (by that I mean development department is <20 people and not a major part of organisation). I'm solving different tasks relevant to current problems, and everything is fine so far, but management somehow came up with idea to imple...
Can somebody explain me in what use-cases I should consider using AMQP like e.g. RabbitMQ? What are the pros and cons?
I've been a programmer for the past six years. Throughout my career, I have worked on many web applications. Most of the time, when a database was needed, it was given to us (the programmers) or we had some legacy database to work on. If not that, we had to create and design the database on our own which was not that ...
I was asked to create for a freelance project a Monopoly game in Java. After finishing it the same guy asked me to create four UML diagrams from which he could understand how the game works. Everything went well this far but his third request presented me with some problems. He now wants me to write for him in about 20...
I have a Java application that I am implementing following the MVC pattern. I want to have a window (view) that contains a form which allows the user to add several text fields. There will also be a button that will allow the user to add more text-fields to the form. I have several questions about this. Will the code ...
I'm upgrading a desktop application that currently displays the currency symbol anytime money values are displayed or printed. A friend of my from the UK told me "Whenever British people see software with the American Dollar Sign ($) it automatically turns them off." Given the fact that we (developers) only have one sh...
I have a reservation system that I have coded and my final task is to allow the user to enter a set of dates and then show them all available options. The reservation table is set up with unit_id, check_in and check_out. There are twelve different unit numbers. So I have to somehow iterate through them and find the uni...
I was reading an old Coding Horror article about indentation, when I read this: Or, maybe you're using a next-next-generation editor that treats code as "data" and the layout (including whitespace) as a "view", making all these concerns largely irrelevant. Exactly what next-next-generation editors was Jeff Atwood ref...
What is the correct usage of UML sequence diagrams? Should they contain objects of View classes or DB classes? Or should they modeled in a more generalized fashion? Or is this completely arbitrary?
I've done some searching and quite haven't come across the answer I am looking for. I do not think this is a duplicate of this question. I believe Windows could be a suitable development environment based on the mix of answers in that question. I have been developing in Ruby (mostly Rails but not entirely) for about a...
i'm designing a client-server system via web broswser and i have this problem: I send the data to the client via JSON, then the javascript view shows the stuff. Then the user takes actions and commands are sent back to the server. Usual stuff, the problem is what if the view's data is corrupted or old? One solution i t...
The question that bothers me is whether it is possible/feasible/reasonable to expect for an open-source app to sell well on the mobile market? Should I believe that my users will use my app, rather than build the checked-out version, and, more important, how can I deal with the competition if I make my app available ...
What's the difference? In my opinion, I can replace the term "Schema" with "Scheme". Can I?