instruction
stringlengths
34
36.1k
We're using agile methods in my current project at the moment, and we have heaps of stories like these: As an assistant, I want to pay a customer a refund so that they can get some money when they request it As a customer, I want to pay for a purchase so that I can receive my item. How we've done it so far is to pick...
I've been using CoffeeScript for a while now. On Wikipedia, it is said that CoffeeScript is influenced by Haskell. But after I check out the syntax of Haskell, I have found little resemblance from CoffeeScript. Which aspect of CoffeeScript is influenced by Haskell?
I'm working through designing a RESTful API. We know we want to return JSON and XML for any given resource. I had been thinking we would do something like this: GET /api/something?param1=value1 Accept: application/xml (or application/json) However, someone tossed out using extensions for this, like so: GET /api/som...
I've read all of the posts I can find on this and I'm still not sure of the answer. I'd like to use a jQuery plugin on my website that is dual licensed under MIT and GPL. Does the dual license mean that as long as one or the other is satisfied I'm fine, or does it have to be both? I've read that a GPL javascript being...
I very often find myself in situations where I should have opened a parentheses, but forgot and end up furiously tapping the left arrow key to get to the spot I should have put it, and doing the same to get back to where I was - that, or removing one hand from the keyboard to do it with the mouse. Either way, it's a st...
Recently I have project in which a directory listing is enabled, due to which some scripts can be seen by outside world. I asked website administrator and he said it's not his responsibility, its the programmer's job. I also asked programmer about this and he said that the script is actually a cron job, and according t...
I love Rich Hickey, Clojure and Haskell and I get it when he talks about functions and the unreliability of side-effecting code. However I work in an environment where nearly all the functions I write have to read from the database, write to the database, make HTTP requests, decrement a user's balance, modify a fronte...
Possible Duplicate: Techniques to re-factor garbage and maintain sanity? Code maintenance: keeping a bad pattern when extending new code for being consistent, or not? I was hired about 6months by a company that uses Agile, but after learning the code I've realized that it's bad code - methods with over 100 lines of c...
I'm slowly trying to migrate our web application to use CQRS principals. In particular, I have separated "write" and "read" interfaces into commands and queries. I have implemented a "reader" class that can read some data from the DB. I have also implemented a decorator for this reader that caches the data to avoid...
There are several approaches on how to model a business process in software applications (BPM software). For instance, a processes can be described in BPMN, EPC, IDEF0, SOMF, etc. Additionally, different process execution languages such as BPEL, RPC, Wf-XML are available. If I were to develop software for the BPM-mark...
I would like to investigate whether ClojureScript, with the associated Google Closure library is a reasonable tool to build modern, in-browser, Javascript applications. My current Javascript stack consists of jQuery, Backbone and RequireJS with the possible additions of some widgets libraries like jQueryUI or KendoUI. ...
I am basically asking this question to see if I am being unreasonable. My current employer has locked down the machines of all developers so that we do not have access to the root or c: drive. For example, I cannot write a directory under C:. I also cannot install any software which touches the registry. Is this an...
Performance testing is something that I, as a developer do when optimizing. However, if the change is purely optimization, should the QA or business user perform their own performance testing? I would reckon they should, aside from testing that the functionality remains the same. If that's the case, is it acceptable fo...
While searching for jobs online I noticed that most PHP web developer jobs ask you to know about algorithms and data structures.While I don't know PHP yet I have started to learn it in order to obtain a job in that field. While I have seen some similar questions on the forum I don't feel like the answers satisfied my n...
After reading another question about JQuery and CDN's, is it feasible for tools like JQuery to "come with" the browser, thus reducing/eliminating the need for the first download from a CDN, or from your own host server. JQuery files specifically are pretty small, so you could easily have a number (all?) of the differen...
My understanding of a primitive datatype is that It is a datatype provided by a language implicitly (Others are user defined classes) So different languages have different sets of datatypes which are considered primitive for that particular language. Is that right? And what is the difference between a "basic datat...
I have a database design question. Basically I want to be able to create a schema for a User model, then use this User model in other models that extend User but I want to design it in such a way that it's generic enough to be used in every application. For example a Profile or Account model might extend User, and in b...
As I understand it, writing your objects in an immutable style can help the performance of your program for compiled languages, as the compiler tends to rewrite your code in single static assignment form under the hood anyway. Is there a performance benefit to using immutable objects in an interpreted language like Pyt...
Short version: I want "Login on program startup" checkbox like in Skype, for example, but don't know how to protect saved credentials securely. I'm writing client application which, before doing actual requests to server, should be authorized by server. Authorization goes as follows: user fills in standard login dialog...
These days I've been learning a lot about how different scientific fields are trying to move their data over to the Semantic Web in order to "free up data from being stored in isolated silos". I read a lot about how these fields are saying how their efforts are implementing the "visions" of the Semantic Web. As a learn...
Our current user's guide is built using asciidoc. The documentation is managed by a non-technical person, but we keep the source text files as well as generated HTML in source control. Issues arise when they are making doc updates for version x.z in the x.y branch. Typically, one of the developers will update their env...
I started with PHP a little while ago. I've been doing a lot of tutorials, practice sites, etc. and it's going great. One thing I like about PHP is how easy it is to get started (downloading WAMP and voila). However, up until I learned about PEAR and MVC frameworks, I haven't put much thought in using a command line I...
I was wondering what advantages the ontology languages of RDFS/OWL has over using a tagging/markup system (such as http://www.schema.org/) for managing and creating metadata?
Many books about algorithms and data structures are coded by imperative languages. Is there any book that can show functional programming languages can do the same thing or do them better? In particular I am interested in sorting, searching, data structures and graph.
About 3 months ago, our engineering group rolled out Review Board to be used for all peer code reviews. Today, I had a discussion with one of the people involved in that process and found out that we are already looking for a replacement (possibly something commercial) because of several missing features. One of the f...
I have multiple entities like Hotels, Destination Cities etc which can contain images. The way I have my system setup right now is, I think of all the images belonging to this universal set (a table in the DB contains filePaths to all the images). When I have to add an image to an entity, I see if the entity exists in ...
When programming in C, I often get the advice to turn on many or all warnings and not ignore warnings. Does the same hold in PHP, should I enable all warnings in the PHP log?
I was browsing a github project and found this module which has more than 10 thousand lines. Is it a common practice to have that much code in a single module? It seems to me that this should be split over multiple modules. Maybe one for each db engine. What benefit does the developer get from making one huge module li...
This is basically a logging/counting application that is counting the number of packets and counting the type of packet, etc. on a p2p chat network. This equates to about 4-6 million packets in a 5 minute period. And because I only take a "snapshot" of this information, I am only removing packets older than 5 minutes e...
I am learning "Programming languages principles" and there is a lot of information about stuff which make up a programming language . Unfortunately every material I came across until now has a lot of technical jargon involved and is very difficult to understand (Atleast for a beginner sincerely trying to understand the...
What's the role of a Project Manager in Scrum? I have heard that it is not advisable for the PM to be a SCRUM Master which I can see as making sense as the PM oversees the project whereas the SCRUM Master is more concerned with managing the work packages. To my mind it would seem that having a PM as SCRUM Master goes a...
I'm in a code shop of two. And while I understand that a bug tracker is useful where the number of programmers is greater or equal to one, I'm not so convinced that logging bugs, changes, and fixes is worth the time when they're trivial. When I find a simple bug, I understand it, fix it, and run it through some testing...
I am a contract data analyst, so I bounce between jobs every 3-6 months, which I find to be a good fit for me, but it leads to some problems when it comes to coding. I mostly do statistics (I've asked a similar question on cross validated, but the answers there are not relevant here), but I have also found out that the...
Here's a problem I frequently run into: Let there be a web shop project that has a Product class. I want to add a feature which allows users to post reviews to a product. So I have a Review class which references a product. Now I need a method that lists all reviews to a product. There's two possibilities: (A) public c...
I have a library that makes architecture to load data from server and display all controls in table layout. It works great but it have a lot of TODOs there. Also, this library in 99% created by me. I starts developing it in when I working in one company, continue developing in in other company - I just move code protot...
It's a bit subjective, but I'm hoping to get a clearer understanding of what factors make an operator clear to use vs obtuse and difficult. I've been considering language designs recently, and one issue that I always circle back around on is when to make some key operation in the language an operator, and when to use ...
I am deriving a class, for use in my application, from a class provided by another group. Should the derived class be in the namespace for my application or the namespace of the parent class? While I am extending the class to add features I need, the added features are not specific to my application. The project that ...
I, perhaps, made a wrong choice of going with a Component-based Framework like JSF for an internet facing, high traffic web application. Development with JSF has although been easier but what I fear now is whether JSF would allow me that scalability & performance with all it fundamental problems & issues. State saving ...
I've come across Twitto, which basically is a web framework that fits in a tweet. It is so short that I can post the code here : require __DIR__.'/c.php'; if (!is_callable($c = @$_GET['c'] ?: function() { echo 'Woah!'; })) throw new Exception('Error'); $c(); It basically searches for a file named c.php and calls wha...
I read an article a while back (forgot from where) that essentially stated that someone wrote a virus and inserted it into an image. The end result allowed the cracker to have his way with the system. How is this possible?
I work on enterprise Java projects that do not have a single entry point from where I can trace the flow of execution. Some of the projects have hundreds of classes, and when I'm asked to add a feature to a project, I often find myself at a loss as to where to start looking at code. What's the best way to dive into suc...
Today at work I found the following situation: We had two tables, A and B, with B having a foreign key linked to the primary key of A. On our application, we got two main situations that created the problem : One where we had to add add some records in A, followed by the creation of some records in B referring to the...
I want to create something useful of my own which others can use it. This can be free or it can make a little money for sustaining its development and increase income little. However, when think about the market, I don't know what market is lacking applications, what types of domain can be possible for a solo developer...
We are trying to make our releases more frequent. As part of that we have blocked out a day of the week where we told users that we'll be doing updates. Similar how Microsoft has Patch Tuesday. This is for a web app running completely server side, by the way. So updates are not a huge problem to deploy. Though they can...
A lot of my research over the next few weeks will be into different CMS's. I've already had a brief look at episerver and umbraco. While reading into these systems I can't help but think that providing content management features are achievable without learning the details and structure of many of these (rather large) ...
Me and my friend are developing a web-app in Python + Flask + PostgreSQL. We have been working on it for the past few months and have developed a lot of schema/use-cases specific to Python + Flask + PostgreSQL. Now, all of a sudden, we plan to move to another NoSQL database (Neo4j) because it somehow fits better to wha...
In Agile development you work on small user stories and produce a working iteration. But what happens when the next user story comes in and affects the design for the already done iteration? Sometimes it seems like re-doing the last iteration or another user story to incorporate the new user story in the last iteration...
I'm writing a document describing process improvement recommendations. I have some best practices I've learned so far. I use those practices most of the time. But I suppose there are other ways to approach the task of writing formal process description document. So, how do you usually structure your documentation? As y...
My primary day job is making HTML applications. With that I mean internally used CRUD-type applications with lots of editable gridviews, textboxes, dropdowns, etc. We're currently using ASP.NET webforms, which do get the job done, but the performance is mostly dismal, and quite often you have to jump through hoops to g...
We are putting together some distribution software, selling about 150K SKU's. Some of our items have additional requirements in order to be sold that are dictated by our vendors. For instance one type of product that we sell are prosthetic feet. Some vendors require that we capture the users weight, activity level, and...
I always hear that PHP is for medium and small websites whereas .NET and Java for enterprise applications. My question is about PHP. Why is PHP not a good option for enterprise web applications? Is it because if the web application becomes bigger then PHP will be slower as it is an interpreted language? I know that cor...
I have a complex non-binary graph model. Each tree node can have multiple children&parents (a node can also have a connection to it's "brother"). A node is represented as square on screen with lines to the connected nodes. For that I want to use Draw2D and GEF libraries. The problem I am facing is the graph layout...
I have been practicing agile for more than a year now. As part of our sprint, some times we will have Investigation Tasks. We skip poker planning for theses tasks, and adds blanket numbers. Theses are tasks like investigating some tricky defects or technical feasibility of some features etc.. Is this proper or is ther...
First allow me to coin a term: code goal-tending: Checking out code in the morning, then silently reviewing all of the changes made by the other developers the previous day file by file, (especially code files you originally developed), and fixing formatting, logic, renaming variables, refactoring long methods, ...
Our customer wants us to write a custom application for him that he can use on a handful of iPads in his company. This application is probably only useful for this one customer (maybe for two or three more in the future, but only after additional customization). I read that if the customer subscribes to Apple's Volume ...
I have a CRUD app for <DomainObject>s. They are persisted in a database. There is a new requirement: keep track of the <DomainObject>s that have been created since the app was opened, so that the user can see what he/she has done. I see three ways to implement this: every time the app is opened, create a new session...
Is it possible to use a non relational database be in an Order management system for an e-commerce company with a large number of orders everyday, like Amazon? Can the benefits of Non Relational databases (scalability, reliability etc) be exploited in this scenario, or, is it impossible to give up ACID properties and h...
Best Practice of making a Composite Control with a repeater activity It's Templated-Based, have paging support via a DropDown and 2 Buttons It should have Event-Handling also Needed to work as a package for ( so didn't want to give template-editability or much programming options ) Key Parts to answer : A Custom Rep...
There are multiple ways of tracking code ownership (i.e., collective, team or individual). In case of team or individual ownership, how do you: track ownership? deal with situations when dev leaves or team splits/re-organizes for new projects?
I am an above average programmer (I take interest in the development of languages, frameworks and technology in general and have a good grasp of systems), but I constantly find my self not being able to deliver things (on time). This does not affect my day to day work as it has good control process (bite sized tasks wi...
PHP is not a bad language (or at least not as bad as some may suggest). I had teachers that didn't even know PHP was object oriented until I told them. I've had clients that immediately distrust us when we say we are PHP developers and question us for not using chic languages and frameworks such as Django or RoR, or "e...
This is a problem because when I do email campaign, There is a link on the email, that link to my company homepage, I would like to differentiate between the visitor come from another way (e.g. search on google) or the visitor come from the email I have sent. Is it able to check such kind of information ? Thankyou
My team at work is moving to Scrum and other teams are starting to do test-driven development using unit tests and user acceptance tests. I like the UATs, but I'm not sold on unit testing for test-driven development or test-driven development in general. It seems like writing tests is extra work, gives people a crutch...
The company I work for sends a lot of emails, and in return we get a lot of bounces. We currently don't have a good way of sorting them and help us archive the routine ones while putting the important ones in front of human eyes. From a format of view these email bounces are not well structured, but there are some sort...
Exchange 2010 has a delegation model where groups of winrm cmdlets are essentally grouped into roles, and the roles assigned to a user. (Image source) This is a great & flexible model considering how I can leverage all the benefits of PowerShell, while using the right low level technologies (WCF, SOAP etc), and requir...
To start with the background, this post is what Jeff Atwood says about CSRF tokens. In this very page, he goes on to say: An even stronger, albeit more complex, prevention method is to leverage server state -- to generate (and track, with timeout) a unique random key for every single HTML FORM you send down to the...
Everyone seems to implicitly assume that the free market of ideas will eventually converge on the "right" solutions in software development. We don't assume that in medicine - we recognise that scientific experiments are needed there - so why should we assume it in software development? I am not arguing for regulation ...
I have a program that I wrote in Delphi. The program is available for download, but some antivirus like Norton detects it as malware, while other antivirus, like AVG, has no issues with it. Moreover, Google Chrome also gives a malware warning when you want to download the program from my website. Is there some way to ...
I have 300-500 images and other files that my program uses. I realize I have two options: Save them in a binary format such as BMP which is loaded dynamically. Save them in a C source file such as XPM which allows it to be compiled into the program, but it also can be loaded dynamically. Assuming both are just as eas...
At now I mainly create a mail account separately (with different domain name eg.noreply@example.com) and i add this mail as one return path. So the bounce message will only go to that mailbox and i parse the mail message one by one to check the failure receipent and the error code, then i convert the error code to the...
My team is considering moving to test-driven development. Currently we have almost no unit testing, we have been only relying on the user acceptance test, and developer's own manual test. Not everyone have agreed with this proposal. In the team, no one really has an experience on unit testing, so it's hard to convince ...
I've found many Code Review tools: Phabricator (by Facebook) - http://phabricator.org/ Rietveld (by Google) - http://code.google.com/appengine/articles/rietveld.html GitHub - https://github.com/ Crucible - http://www.atlassian.com/software/crucible/overview GitLab - http://gitlabhq.com/demo.html SmartBear - http://sma...
I've been reading about Semantic Web technologies such as RDF/RDFS and "ontology", but was wondering how each of these are related? At the moment the terms all seem interchangeable, or I'm not understanding a fundamental concept here.
How can I prove that a dynamic programming (dp) strategy for a problem will work or not? For greedy algorithms, we can prove by showing the sub problems exhibits matroid property. Is there any such methods for dp algorithms?
For example, there are some key-value configuration in .properties file. Such like someFeatureEnable=true. It must be bool type value which will be parsed by framework, in my case it's typical Java Spring configuration. Spring will handle the configuration and throw Exception when users set someFeatureEnable=123. My qu...
I'm fairly new to Azure but I noticed that Visual Studio auto-creates the following folders (among others) ... /<nameOfAzureProject>/bin /<nameOfAzureProject>/obj /<nameOfAzureProject>/csx <== ... Now the bin and obj folders are fairly standard. But I'm not clear about the purpose of the csx folder. Any ideas?
I'm learning web development. My main OS is windows 7 but I've used Linux and currently dual-booting with Ubuntu. My Linux knowledge however, is pretty limited. I can work with the command line on simple tasks but that's pretty much it. I don't do any shell scripting, don't know very well the most important commands, n...
I recently joined a rapidly growing startup. In the past 3 months the development team has grown from 4 to 12. Until now they were very laissez-faire about what developers used to do their work. In fact one of the things I initially found attractive about the company is that most programmers used Linux, or whatever OS...
Possible Duplicate: I don't program in my spare time. Does that make me a bad developer? A lot of blogs and advice on the web seem to suggest that in order to become a great developer, doing just your day job is not enough. For example, you should contribute to open source projects in your spare time, write smartpho...
What is the best way to protect your interests as a freelance web designer when: The client is unresponsive and takes a long time to make decisions The client makes constant changes Feature creep
When I'm working I feel like most of the time I'm not doing actual work. For example after making a change to the code in order to test it, I have to first build the project, and start the server(say JBoss). Upon testing, I find that there is another small issue. So I bring down the server, make the changes, build agai...
I was reading Extreme Programming Explained, Second Edition and in the chapter 11 "The Theory of Constraints" the authors talk about the old and obsolete "push" development model and the XP way, the "pull" development model. It looks like a quite important concept, but it takes only a very small paragraph and two image...
I noticed that every developer implements a somewhat different flowchart for solving programming problems. By flowchart I mean a defined system of techniques that the developer goes through in a certain sequence, trying to solve the problem at hand. Some examples for techniques: Google "how to..." or "... tutorial". S...
What's the difference between Building and Compiling.
I wrote some sorting algorithms for a class assignment and I also wrote a few tests to make sure the algorithms were implemented correctly. My tests are only like 10 lines long and there are 3 of them but only 1 line changes between the 3 so there is a lot of repeated code. Is it better to refactor this code into ano...
Ok so I am familiar with developing Form and Console applications on Windows using Visual Studio .Net with C#, but where do I start when it comes to Linux distro's like Ubuntu, is there an equivalent? How would one go about matching what they can do in a Windows environment with .Net and C# in a Linux environment witho...
I am trying to understand how Lucene should be used. From what I have read, creating an IndexReader is costly, so using a Search Manager shoulg be the right choice. However, a SearchManager should be produced by a NRTManager(which, by the way, should replace the IndexWriter for every add or delete operation performed)....
The wikipedia article on Limewire says that "LimeWire 5.5.11 and newer have been disabled using a backdoor installed by the company". How are such backdoors implemented? Is it as simple as the the program going out and checking a web service and disabling itself? If it's in fact so simple, it has to be stored somewhere...
Due to the inherent risks associated with using dynamic languages (e.g. Python, Ruby) carelessly, what (if any) standards should be imposed on production code written in these languages?
I've been talking with a friend about the purpose of Javascript, when and how it should be used, etc. He quoted that: JavaScript was designed to add interactivity to HTML pages [...] JavaScript gives HTML designers a programming tool HTML authors are normally not programmers, but JavaScript is a scripting language w...
In development, I would normally have my own test scripts that would document the data, scenarios and execution steps that I plan to test; this is my dev test plan. When the functionality has been deployed to Test, testers test it using their own test script that they wrote. In UAT, the business user then tests using t...
I have seen this at many places. a Parent class has a static method to create objects of the right subclass and at times we have a dedicated factory class with instance methods to create object of various subclasses. Which one is used in which scenario ? Like static factory methods of InetAddress in java.net to create...
Sorry about this long post, but I think it is worth it. I have just started with a small .NET shop that operates quite a bit differently to other places that I have worked. Unlike any of my previous positions, the software written here is targeted at multiple customers and not every customer gets the latest release of ...
In an MVC framework i have often heard that use business logic in a model. But i think using the business logic in controller would run faster as view is directly connected to controller. I want to know what are the advantages of using a business logic in model?
How do you remember programming related stuff? Have you had the feeling that you've encountered the error you have before you right now, a few years ago and you could swear you knew the cause then but now you've forgotten it? Did you work with the xsl's string parsing some time ago but now you can't remember exactly wh...
The result of the following process should be a html form. This form's structure varies from one to user. For example there might be a different number of rows or there may be the need for rowspan and colspan. When the user chooses to see this table an ajax call is made to the server where the structure of the table is...
In my company I am faced with assertion that graphic interfaces for VCSs like SVN or (especially) Git tend to mess repositories - especially regarding branching. Being a passionate Windows and GUI user, I have a hard time believing this is true. For Git especially, I accept that some moves are too complex for conduct...
I have a training management and tracking system, with a high level structure as follows: We have a Role1, e.g. Manager, Shift-boss, miner, etc. and a Candidate, training for that Role. The role has a list of courses and their subjects the candidate needs to complete to qualify for the role. Candidate has a TrainingHis...
I am writing a query based financial application. It lets the user to write complicated equations (much like WHERE part of an SQL query) and find companies matching those criteria. For the above, I currently have more than 500 columns in the database table (each column representing a financial field). Example of Column...
What is the common practice to write classes which take some data class and store it to some backend? In my case I have table classes (columns, headers, etc.) which are written to Excel. So I have a class Table with the data and a class ExcelDocument with access operations and basic writing (cells, ...). Where would I ...