instruction
stringlengths
34
36.1k
I've often run on this problem. Now I am working on a team of 4 and we built a lot of stuff. We are still finishing somethings and making changes. The problem is that those changes can (and most probably will) cause interface/business to crash. We do not have any kind of map that show us something like "If you change t...
In a nutshell and for those who didn't know it, Lisp functions/operators/constructs are all uniformly called like this: (function arg0 arg1 ... argN) So what in a C-like language you would express as if (a > b && foo(param)) is transformed to a Lisp sexp like (if (and (> a b) (foo param))) . As things get more real/...
I was asked to lead "JAD sessions", which I've heard of before, but never facilated before; at least in name, they appear just to be a fancy name for stakeholder workshops. My experience has been that "group think" and "follow the leader" are common issues with this approach, but trying to stay open to the concept. Bas...
Right now, the current deploy process at my work is based around tagging from the trunk and switching various PHP web sites for clients on our QA and Production servers. While this is simple from the technical level, it becomes really tedious when you have over a dozen updates to a dozen different sites that need to g...
I'm currently studying a Master in Computer Science and I am interested in working with Software Agents and C#. I have found so much information regarding theoretical aspects but just a few articles focused on practical programming aspects such as architecture, design or implementation. Could anybody suggest any good s...
I recently found out that Facebook had a programming challenge that if completed correctly you automatically get a phone interview. There is a sample challenge that asks you to write an algorithm that can solve a Tower of Hanoi type problem. Given a number of pegs and discs, an initial and final configuration; Your alg...
What datastructure would work for the triangular peg board game? It's a 5x5x5 triangle with 15 holes.
I often see several terms (such as software stack, framework, and middleware) thrown around a lot, and it would be very helpful for someone to explain the differences between them I was prompted by my research that I did when reading this question. I've read their corresponding Wikipedia articles, but I am still unce...
As a student programmer, I only have very limited knowledge of the workings of much of the consumer software. I would love to one day be able to reverse engineer software to learn what makes it tick and implement it in different ways. My real question what is the general process that reverse engineering requires. I am ...
So, I've got the following problem: I have a number of ordered elements, ordered in the following way: Type 1: Must be the first element. (only one possible, always present) Type 2: Must be the second and following elements, if present. Type 3: Must be the ordered last. Stated a bit more succintly / pseudoregex: 12*3...
I am now entering the world of java ee 6. And I am supposed to used different technologies like jsf, jpa, different kinds of beans and all that stuff. I am learning using the netbeans IDE, which is, I should say, very efficient when it comes to getting the work done. It is just that, I came from the old school servlet ...
Suppose you have a collection of blocks, each with a certain height and a certain weight. For example: Sample input: (190, 190) (120, 40) (100, 10) (90,130) (70, 40) (60, 70) (30, 30) (10, 90) Sample output: 4 You want to find the maximum number of blocks you can pile, with 2 constraints: each block must be lighter t...
I have an entity that is called Master which is composed of a number of Slave entities. There can only be one Master in my database and I want to query repositories to get the Slave for a given id. I initially created a SlaveRepository and queried that by id. That seems fine and works and other developers could use my ...
I'm working on the use case model of a web design application something like Dreamwaver, I'm little confusing about to which level should I write the use case model. ex: when the user insert a text should I provide a use cases of: select font select size color Italic bold .. .. .. or it's enough just providing a use...
Winkler's pizza picking problem: A circular pizza pie of n slices, where slice i has area S_i i.e, the area is different for each pie piece. Eaters Alice and Bob take turns picking slices, but it is rude to create multiple gaps in the pie (consider it not allowed). Thus each eater is restricted to taking one of the...
I had the opportunity to develop applications in several niches: server back-end, desktop clients, and recently a small scale website. Once indulged in the website design I am asking myself and you how come the UI design process is so different? Can you point out the differences, and why they originated? Once, HTML w...
I have used the web and Stack Overflow extensively during the past month or so in creating my final project for my C# class. I have used so much code that I didn't write myself that I feel I am being unethical by not giving proper credit to the people who helped me; or the websites that have provided excellent examples...
I want to write a class which offers two sequences of elements to its users. The first one (lets call it "primary") is the main of the class and will be use 80% of the time. The second one (lets call it "secondary") is less important, but still need to be in the same class. The question is: what interface should the cl...
I have used an MDA (model driven architecture) tool in the past where we modeled via UML and this generated the business entities (our domain model) and the ORM (mapping etc) amongst other things. A lot of the business code and services working on the domain were part of the model and our repositories were returning th...
I was wandering if there are any frameworks like Google Web Toolkit to create Web Apps? (Apps like Evernote, Spring Pad, Google Docs, etc.). I am fluent in Java but could learn a new language without much problem. So is there any kind of framework that would allow me to write Web Apps without worrying much about UI ele...
I used to develop in Django/Python and Rails/Ruby (and before that C/C++ and C#), and I'm now at a job where we do enterprise Java development (Spring, Hibernate, RESTEasy, Maven, etc.) for web applications and web services. Coming from the Convention over Configuration world, what's the best way to get up to speed doi...
I have a question about compatibility and co-integration of programming languages, databases, frameworks, libraries, different API and more (together referred as “items”). I have added a list of items that are planned to be used when building freelance platform/marketplaced, but I would like to know if I am missing an...
I can write independent java, python, c, c++ code but I do not know every aspect of them. For example, I don't how to code with database in python/c/c++. I have few experience with GUI programming. I was aware that most of the jobs isn't just need us to write an simple code. They may need some GUI and you need to uploa...
I've been reading about Continuous Delivery and it sounds awesome to automate the deployment process. I've been reading about possibilities how to do this with Java Webapps, but usually it ends up with CI server or maven plugin deploying to Tomcat WITHOUT restarting the Tomcat using Tomcats management API. But that lea...
Today I decided to perform a clean install for Creative Sound Blaster drivers, as they always start glitching all by themselves after some time. And that meant I had to go through the whole cleanup procedure. And that took me almost 2 hours.. And honestly, I can't see a reason why?! And although Creative, IMHO, is an a...
I participated and wrote a large amount of code in a project which my current company outsourcing to my former company last year. After that I left my former company and recently join in my current company. Several days ago, my current employer asks me to continue the project on top of the existing code (my current co...
First of all, is there a name for this as a bona-fide design pattern? Currently I've just been referring to it as "unobtrusive javascript". Here is a brief example of what I am talking about: 1.) Use HTML5 data-* attributes to define values that will be used in UX scripts. Something like this: <input type="date" data-a...
I've just learnt how lazy evaluation works and I was wondering: why isn't lazy evaluation applied in every software currently produced? Why still using eager evaluation?
I'm writing a class that draws a very complex image, with multiple parts. I also plan on adding to the class to add more functionality. Would it be right to make a function for each part, even if that function will only EVER be called in the render function? I see an upside to this since it will be easier to read the c...
I'm trying to make a library that will be used by other developers. I want to obey the "don't re-invent the wheel" principle and and I also want to make the deployment a matter of dropping a single .dll into the bin folder. So far, I've chosen an dual MIT/MS-PL license. Is there anything stopping me from compiling oth...
In the past, I have used inheritance to allow the extension of Windows forms in my application. If all of my forms would have common controls, artwork, and functionality, I would create a base form implementing the common controls and functionality and then allow other controls to inherit from that base form. However, ...
We currently have SVN setup on a remote development server. Developers SSH into the server and develops on their sandbox environment on the server. Each one has a virtual host pointed to their sandbox so they can preview their changes via the web browser by connecting to developer-sandbox1.domain.com. This has worked w...
I am writing a limited C/C++ code parser. Now, multiplication and pointer signs give me really a tough time, as both are same. For example, int main () { int foo(X * p); // forward declaration bar(x * y); // function call } I need to apply special rules to sort out if * is indeed a pointer. In above code, I have ...
I get the impression that in practice, debuggers are rarely used for Rails applications. (Likewise for other Ruby apps, as well as Python.) We can compare this to the usual practice for Java or VisualStudio programmers--they use an interactive debugger in a graphical IDE. How do people debug Rails applications in pra...
I'm working on a project that includes a lot of creating/manipulating and reading JSONObjects and arrays but not in a systematic way. So there is JSON code everywhere. It is ok for me except that every time I work on a JSONObject I got to handle JSONException. So I created a class that extends JSONObject and Override t...
Our (mid-size) company (with 150 employees) has witnessed considerable growth since last year, and as a result we have been conducting lots of interviews to hire more and more engineers to bring new projects in motion. To begin with, following is our interview process Screening resume by HR Telephone technical intervi...
What is the correct design for a for loop? Felix currently uses if len a > 0 do for var i in 0 upto len a - 1 do println a.[i]; done done which is inclusive of the upper bound. This is necessary to support the full range of values of a typical integer type. However the for loop shown does not support zero l...
When using the strategy pattern, is it good practice to pass this to a method on this.strategy? I have a strategy interface with one call, TakeAction. The idea is that TakeAction decides which of the several possible actions the Client should perform and then calls the appropriate method on the client. So in a concre...
I'm designing a small library and there is a strong temptation to provide synonyms to some of the exported functions. var foldl = function(){ ... }; var reduce = foldl; //reduce is a synonym for foldl I imagine that the multiple names might help the initial learnability of the API (since the user is more likely to stu...
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 really is, in terms they can relate to. I.e $$$ Get a good baseline so that we can measure the progress. Short backgrou...
After reading a question about books every programmer should read, I wonder if the following should be considered obsolete: Code complete: 1st edition in 1993; 2nd edition in May, 2004 Introduction to algorithms (Cormen, Leiserson, Rivest, Stein): 1st edition in 1990; 2nd edition in September, 2001; 3rd edition in 200...
For about eight months I managed a development team doing a re-write of a web based application. During this time, I was focused on many aspects of the project that did not involve directly writing code, even though by trade that's what I started out as. Recently the number of developers assigned to the project has dr...
I've seen a lot research articles and tech blogs that boast the benefits of software testing. I've convinced on that. But since all the software testing research are conducted by large software companies, I do not believe they really apply to startups. Since startups have different needs and constraints compared to lar...
Let's pretend we have a service that calls a business process. This process will call on the data layer to create an object of type A in the database. Afterwards we need to call again on another class of the data layer to create an instance of type B in the database. We need to pass some information about A for a fore...
Currently, we have a versioning scheme following the major.minor.patch pattern. Development is done in a branch (i.e. - branches/b4_2); a release is a tag (tags/r4_2_0). To determine the version inside the code, we have a class which can parse the SCM URL (FooVersion.java). If the URL represents a branch, the SVN revis...
I am trying to design a solution for simulating gaseous fluids in confined areas, I am using naiver-stokes equations for fluid dynamics but since it only covers incompressible fluids like liquid, i needed to find a way to simulate compression Recently, I came up with the solution which is, creating a field storing pres...
In software development, a developer is usually paid either annually (by fixed salary) or by the hour. For the most part, it seems like this works. However, I've seen industries where professionals are paid for the task. For instance, in agriculture a worker is paid per bushel. In sales, a worker is paid by commission ...
Ever since I started programming I've seen a header at the top of most code files indicating some sort of copyright: e.g. /* Copyright (c) 1998 Innotech */ or /* Copyright (c) 1998-2008 Innotech */ Conceptually I get the idea... depending on your wants/needs it roughly translates somewhere between: Hey check it out...
We are wanting to have developers build an in-house payroll and time sheet application using symfony2/doctrine2. We are simply at conceptual stage at this point and this will be our first time and getting developers to build an application for our company. Hence, it is very important to us that we provide the most vali...
What is the difference between Software Project Management Process, and Software Development Process, or Software Life Cycle?
I am getting into Android Development and want a book to help fill in some of the gaps. Is there a book out there that's the de-facto standard for describing best practices, design methodologies, and other helpful information on Android Development? What about that book makes it special?
I'm about to propose a new architecture for several pieces of the system I'm working on; it's going to entail getting a lot of number crunching and data translation jobs off of tomcat, and on a more fitting platform and I need a little advice. First, the way this system is currently setup: There is an AS400 and a Postg...
I have a course with the following description: The purpose of this course is the study of programming language security features and languages designed to support it explicitly. Static and dynamic constructs for security in languages and systems, as well as software engineering security principles/patterns. Topics: ...
The organization I work at has some interesting requirements when it comes to pricing for online commerce. Currently the developers write different 'pricing rules' and those rules can be applied to our items based on attributes of the items. For Example: INPUTS: [cost, sug_retail, discontinued, warehouse_qty, order...
For a time now I have been wanting to make my own programming language. I'm 17 and the only language I know is Color BASIC. I know that compared to today's complicated languages, it's pretty weak. But I was wondering if it would be hard to create a language that is kinda like color BASIC/BASIC and how would I start i...
I've been doing some needed optimizations lately. One thing I've been doing is changing some ostringstreams -> sprintfs. I'm sprintf'ing a bunch of std::strings to a c style array, ala char foo[500]; sprintf(foo, "%s+%s", str1.c_str(), str2.c_str()); It turns out that Microsoft's std::string::c_str() implementation ru...
I'm creating an application which will programmatically sent HTTP GET and POST requests to a site and processing the data received. If I want to release that application, do I have to get permission from the site's owners?
I'm not looking for advice how agile process should work. I know that part. I'm curious what the best way to adapt the process to a typical large, well-established corporation who loves its "processes" and gate/passport reviews. For those lucky enough not to know what they are, gates/passport things are essentially wat...
I have a messaging User Control, that is used across 4 projects, and for each change I have to propagate it in 4 places. This is obviously against the DRY principle. However, centralizing user controls is not an easy task too, because you have both markup, and code-behind, and we know that markup won't get compiled til...
One of the things I really like about my current job is that we developers are encouraged to make open source contributions. However, this encouragement has always been verbal. I've read some horror stories about developers having their open-source work legally claimed by their employer. I'd be more comfortable if we h...
I've read here on P.SE more questions in which beginner programmers are advised to pick Python as their first programming language. Don't get me wrong, I like Python. I like it a lot! But its philosophy revolves around "We are all consenting adults here". From an experience/knowledge point of view, a beginner programm...
In constrast to Database design good practices I wanted to ask: What are the top worst practises you encountered when having to work with other people's database application code & databases ? Mine so far are: Not putting any foreign key constrains in the database (for ease of web forms development...) SQL queries by...
At work we mostly do WinForms development and it’s not a secret that it is already very outdated. I have a passion to learn new stuff like WPF, MVVM and want to use full advantages of C# 4.0. There is no way I can push my bosses to change “well-recommended” and “proven” technologies like WinForms to something else. I ...
Possible Duplicate: When do I need to use a framework? When should I start learning a PHP Framework I started to learn PHP about four months ago, and I have been writing some applications for three months. Recently, I've been using CodeIgniter for various projects. Using CodeIgniter is awesome as it is easy to code w...
Is Django a good solution for creating applications that won't use any database and communicate only through an internal API?
In researching unit testing best practices to help put together guidelines for my organization, I've run into the question of whether it is better or useful to separate test fixtures (test classes) or to keep all tests for a single class in one file. Fwiw, I am referring to "unit tests" in the pure sense that they are ...
Possible Duplicate: Why would you use MVC over Web Forms? What is the difference between ASP.Net MVC and Web Forms? Is either preferable? I want to use ASP.Net development as a springboard to teach myself C#. What is the best way to go about this?
If you ask programmers why they should write clean code, the number one answer you get is maintainability. While that's on my list, my main reason is more immediate and less altruistic: I can't tell if my new code is correct if it's too dirty. I find that I have focused on individual functions and lines of code so m...
As I gain more professional experience, I've become a bit more skeptical about a lot of the politics of the interview process. In particular, I'm curious to know if y'all think it's ok to ask the interviewer the same questions you're asked. For instance, in an interview a few years back, I was asked: Where do you see ...
Our company moved to Scrum recently on a product that was almost coded by a single person (Joe). We have support to do with our exising customers that we try to integrate in our process. For now we tried the following approach: We do a rotation on a person in charge each week. The person in charge for the week may spe...
Some code is written to generate Excel Spreadsheets (Office Interop). The code performs very poorly. A subsystem is designed to generate the files at night. Performance isn't a concern at night. A function is created to pick the correct file from the 100 different files available depending on a chosen set of param...
I'm trying to add Continuous Integration to a project. According to Wikipedia, one major piece of CI is automated builds. However, I'm confused about what, exactly, that means, as the CI and build automation articles seem to disagree. Specific points of confusion: what does "automated build" mean in the context of: ...
This topic stemmed from my other question about management-imposed waterfall-like schedule. From the responses in the other thread, I gathered this much about what is generally advised: Each story should be completed with no bugs. Story is not closed until all bugs have been addressed. No news there and I think we c...
The C program Prog when ported to Java would be called JProg, a port to C++ would be Prog++ and a port to Python would be called PyProg. These names are all quite obvious. But the C# port would be called IronProg, which strikes me as strange. Why is it that programs ported to Visual Basic or C# are often called Iron*? ...
I have developed a habit of using safe C++ constructs where possible, but there is one place where I'm always not sure if it's better to use references or resort to good ol' pointers. Example code: int FillFancyPointer(char *&ptr) { ptr = NULL; char *tmp_ptr = static_cast<char*>(calloc(...)); if(!ptr) ...
What I mean by that is, how do you go about developing on a code base you share with developers who have been working on it for years and are very familiar with it? I don't want to step on anyones toes, but I get not so subtle complaints about the way I do things, whether it be how I whitespace my code, or how frequent...
I have been writing in C# 4.0 a lot lately and trying to write as lean as possible. As such, I have not been using the classic try/catch blocks and using statements as often. I understand the general function of .Net's garbage collection and exception handling - I want to bulletproof my code and be efficient with objec...
I'm a recent college graduate (last May!). While I was still in school, I wanted to make sure that I had a job before I graduated, and very early (probably too early) in my job search I settled on one in a region I'd been hoping to move to after undergrad. However, I've been second guessing this decision for months no...
I have not intended to hash and rehash the same matter, but just to decide, what to learn first (JavaFX, Flex, HTML5, etc.) I would pull through a kind of survey, especially as the recent similar questions here came out since at least one year. So, what is JavaFX prospect as a RIA technology for the next couple of yea...
Common Lisp allows you to write macros that do whatever source transformation you want. Scheme gives you a hygienic pattern-matching system that lets you perform transformations as well. How useful are macros in practice? Paul Graham said in Beating the Averages that: The source code of the Viaweb editor was probab...
I've been a Java (and PHP) developer for most of my life, but will need to use C for my next project. I remember some basic stuff we did back in school with fork, pthread, semaphores, etc. but I'm not sure if that's still the "way to go" here, or if there have been any recent developments/improvements etc. Google's re...
If I publish some software on my website which can be downloaded and used free of charge, do I still need a disclaimer? I mean, I am not even selling anything, there is no contract, so why should there be an implied warranty? (Which also makes me wonder why there are disclaimers on things like the MIT license.) Edit: I...
Does the Pareto Principle, that being 20% of the causes are link to 80% of the problems, apply to software bugs, and if so, are there any common patterns of note on average within the 20% of cause?
ORMs and persistence ignorance make perfect sense: if I am programming in a language, then I want to use the language's native implementation of objects and data structures to drive my program. I shouldn't need to worry about SQL or a database, and I always thought that inline SQL strings in a program was very cumberso...
I'm working with ASP.NET Web User Control (WUC) and I got to this question: I'm creating a WUC to show an object's data. This object is already loaded when I call that WUC. I'm wondering what would be better: give the WUC the full object or only the necessary attributes?
I am looking for a lightweight way to notate changes made to a file. The obvious answer to this is a version control system. But this is more robust than necessary for what I would like to do. All I want is the functionality to compare an edited file to its original in a lightweight manner.
I understand that all PHP variables need to be preceded by a dollar sign (e.g. $someValue = 1), but why is this the case? Why was this design choice made? The reason I ask is my girlfriend asked why when I mentioned that PHP variables need to begin with a dollar sign, and I realized I had no idea why this syntactic ch...
So when I was at university I was educated on the benefits of UML and its future in code development. But from my industry experience, I've found that while we do use diagrams—ranging from ER diagrams, class diagrams, state diagrams, to work flow diagrams—all of it is for communication purposes. That is, I've never gen...
When I say "Revisional Data Model", I mean a data model where information is never lost: Deletes never destroy any rows, and updates always cause an insert somewhere else to preserve a row's previous state before the update. There are a few I've read about, and heard from colleagues: Triggers in the database. The mai...
I am fairly new to NodeJS and I'm having a hard time wrapping my head around the asynchronous nature of functions when I really want one call to follow the other in a synchronized way. Say for instance I am calling web service methods. Every method has a callback function. But what if I want to call 10 of them in a spe...
I'm not asking here what the arguments are for/against testing internal methods (though I'll restate some, and don't mind hearing others). My questions relate to the implications of only testing public interface. Especially, whether I understand the extent of the "refactor" part of Red-Green-Refactor in by-the-book TD...
We are working on getting a new application lifecycle management (ALM) system, including a bug tracker, a documentation system, project management, etc. The concern is that we deal with quite complex embedded systems and we would like to have the best possible integration of the different services (project management, ...
In a career of software engineer, you need to learn new technologies very often and always in less time due to deadlines. So just need to know how programmers should go about learning the technologies really quick still thoroughly. What approaches do you follow?
I am working on two different project simultaneously where whenever the changes are made we use Tortoise SVN for project A Backed up by folder for Project B (this is done by me on my system) I find SVN good for maintaining the latest code server machine and update it whenever necessary. For Project A, I happen to mak...
Has anyone had this issue of a project defined as 'Agile' being overrun by requirement changes ? I work on a development project which is run in 4 weeks Sprint but there are always changes in between these Sprints . Is it still defined as Agile then ? I feel it's sort of a sub Agile process - The requirements of an Agi...
So basically I make several programs. Of course one program often used code from another. So I have my own personal "library" Well, I do write jerk codes. Then When I open a project, the project will require another file. I add that file and that file require another file, then I add that file and that file requires an...
The importance of TDD needs to be propagated but there's always a gap in the project timeline and time needed for developing a TDD project. Customers usually do not understand the importance of code maintenance or TDD and want the project to be finished as soon as possible. The result would be a Test After Developmen...
I'm trying to understand the difference (if any) between the two. According to the Wikipedia page for Multiple Dispatch it is synonymous with Function Overloading, but then later on goes on to say: In a language with only single dispatch, such as Java […] which seems like a contradiction, since Java does support fun...
I am teaching myself Clojure. I've started using Leiningen, I'm working on Clojure Koans, plan to do LabREPL next, and will have a look at Noir. My question is: what are the essential "must know" Clojure libraries and functions to know beyond those covered in the above learning plan? Looking at Clojure Contrib, there ...
I'll be brutally honest: I hate writing client side code in JavaScript. I'm not a fan of this language, to say the least. It seems silly to me that browsers support a programming language, rather than an intermediate virtual machine (like CIL or JVM). The latter would allow programmers to write in a language of their c...