instruction
stringlengths
34
36.1k
I am just starting out in programming learning Aspect and I'm nearing the end of the introduction. I've learned about algorithms and functions and types of code and Python and briefly the basic ideas of programming. And I have to say it totally fits the description of a language it is like learning how to speak again. ...
I am working on an issue where the exception only occurs in our production environment. I don't have access to these environments, nor do I know what this exception means. Looking at the error description, I'm unable to understand the cause. javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure ...
I am about to start writing a UI view where many small text items are laid-out over the view and when the user hovers over a text item a dynamically-generated image is displayed (like a tooltip), relevant to the context of that text item. When the user clicks the text item, another view will change with a larger versi...
I've just begun using a popular, well-documented graphics engine, and was given a month to create some small programs and get familiar with it. The library is huge, and there are sections I haven't explored. Due to a time-crunch, my tech-lead has asked me to start designing my software (sequence and class diagrams) eve...
Suppose I design a platform over a platform (say Java or Win32 or .NET), which consists of various layers like Database, User Interface, Cloud etc. Now every team would be working to make their product, say database best and less focused on their relationship with other teams, hence resulting in various issues when do...
The question is this and the detail follows: is there anything I can say/bring up, as a programmer, to bring him to my side? I'd love to hear valid arguments for both sides on this one, but mostly suggestions for how to talk him around. My situation is this: I'm working on a team project on my degree course, building...
I am the lead of a small team where everyone has less than a year of software development experience. I wouldn't by any means call myself a software guru, but I have learned a few things in the few years that I've been writing software. When we do code reviews I do a fair bit of teaching and correcting mistakes. I will...
I am not the best in maths, not very horrid either, but lower than the average, I've always been thinking to improve my maths, but schools and books didn't do the job because I get bored too fast. The only thing I don't get bored with is coding and gaming, so I thought what if coding a program that solves mathematical ...
I'm working for a company that has recently hired me to create a new version of their existing software, which is now over 12 years old. The new software is a complete re-write of the old and they want it to be much more "online" than the previous version. I'm one of two programmers, the other having been with the comp...
I have a small personal project that I expect will be viewed by, at most, about 5 people. 'Tags', as used on this site and StackOverflow, would be helpful. Can I explicitly use something called a Tag in my personal project where the purpose/function is essentially the same?
I'm looking at diving into Haskell for my next (relatively trivial) personal project. The reasons that I'm tackling Haskell are: Get my head into a purely functional language Speed. While I'm sure this can be argued, profiling that I've seen nails Haskell close to C++ (and seems to be quite a bit faster than Erlang). ...
It's my understanding that expression templates as a technique were discovered significantly prior to the original C++ Standard in 1998. Why weren't they used to improve the performance of several standard classes like std::string and streams?
My customer, a translations business owner, just told me that he has been reading about Ruby on Rails and told me that "there are more PHP guys around there" and "it seems the community prefers it". What would you, as software engineer and freelancer, say to the customer to achieve these goals: Sell Make him see that...
I stumbled upon a blog entry discouraging the use of Strings in Java for making your code lack semantics, suggesting that you should use thin wrapper classes instead. This is the before and after examples the said entry provides to illustrate the matter: public void bookTicket( String name, String firstName, Stri...
I'm working on classes that cover software tools and languages. Obviously the classes are going to be more valuable if the students actually do some of what they're supposed to be learning, so I'm planning to incorporate lab work. Has anyone used automated functional testing tools to grade lab assignments? Lab 1 is t...
What's the coding standard for naming a private method in a language which does not have the private modifier? Specifically, I am talking about Javascript. Below I've placed an underscore at the end of my private method's name, but a colleague told me that underscore is usually for class fields. var MyClass = Class.cre...
I came across the following question on a website for interviews: Here are 3 products: table, chair and bench. Product can be of material: wood, metal, and plastic. Design class structures for this. My first thought was to have an abstract class Product with a protected Material class member as shown below. My actua...
On a fairly regular basis, I run into problems that have already been solved by open source projects. Let’s say, purely for the sake of example, that I’m adding functionality to a piece of open source software which lets it line wrap some information in your terminal. It needs to know the width of the user’s terminal t...
We have a WCF Service (self-hosted) which can receive several types of calls from the outside, each call encapsulates a business logic procedure. We need to construct a web application which will act as an administrating app, for all users of the service. So we need to have access to all inner-entities of the service a...
We have 7 developers in a team and need to double our development pace in a short period of time (around one month). I know there is a common sense rule that "if you hire more developers, you only lose in productivity for the first few months". The project is an e-commerce web service and has around 270K lines of code....
I work as a developer in a company, The company I work with has to deploy the app I made to their client. Number of clients are 3 and each client has around 100 iPads. Now my question is, What different ways we can use in order to deploy and distribute app seamlessly? How good is AppCentral to distribute applications...
I've used JavaScript and some frameworks (jQuery, Prototype, some node.js) for client-side web programming, but never on the desktop, where I do most of my scripting work in either Python or Bash. But IMHO, JavaScript would make a great scripting language if used outside of the browser. Has anyone tried this? Can JavaS...
Problem: It seems with almost every development effort I'm involved in, no matter how much time is spent planning prior to starting development, there is always a large amount of changes required either midway or towards the end of the project. These are sometimes big changes which require alot of re-development. I don...
I asked this question on stackoverflow, but it seems this question is not suitable there, so I post here for discussion. BPMN (Business Process Modeling Notations) is used for modeling business process by visualization, thus making intangible ideas become physically concrete through the expression of BPMN diagrams. The...
I know methodologies, like Extreme Programming (XP), which specifies its own specific practices for developing software. However, unlike Scrum where it focuses more on management aspects, XP specifies software practices that are required to be followed. From reading this article, these steps eliminate the explicit mode...
Does anyone know a good algorithm for drawing an ellipse from a bounding box? draw_ellipse(int s1, int s2, int s3, int s4, color c); I don't need something optimized to incomprehendable , unreadable efficiency. Just something good enough to use for a simple drawing api. You can provide the algorithm in your answer in...
Possible Duplicate: Where can I find programming puzzles and challenges? Recently in our workplace we have been playing Design Pattern Poker. This is fun and really helps the participants to understand design patterns and to think of useful way to apply them. Can anyone recommend any other similar, fun games that wi...
I've been asked to evaluate what appears to be a substantial legacy codebase, as a precursor to taking a contract maintaining that codebase. This isn't the first time I've been in this situation. In the present instance, the code is for a reasonably high-profile and fairly high-load multiplayer gaming site, supporting ...
I'm looking to make some performance enhancements to our site, but I'm not sure exactly where to begin. We have some custom object caching, but I think that we can do better. Our Business We aggregate news stories on a news type of web site. We get approximately 500-1000 new stories per week. We have index pages that s...
What are the pros/cons (if any) to using string output; int i = 10; output = string.Format("the int is {0}", i); versus string output; int i = 10; output = "the int is " + i; I have always used the latter example, but it seems as though a good majority of online tutorials use the string.format example. I don't thin...
I'm coming back into the winform world after being in the web world for a while. Is it common or otherwise feasible for developers to use IoC in winform? My concern is mainly with performance. I envision that I will need to "bootstrap" or initialize all my inverted items that are required by a given form instance on ...
Background I have recently been tasked with designing a rebuild of an existing .NET web application that currently uses a third-party company to handle large file transfers (as big as 50Gb). Currently, the .NET app depends on a .JAR (Java Applet) provided by this third-party which is called up inside of an iFrame and e...
Background I am not a big fan of abstraction. I will admit that one can benefit from adaptability, portability and re-usability of interfaces etc. There is real benefit there, and I don't wish to question that, so let's ignore it. There is the other major "benefit" of abstraction, which is to hide implementation logic ...
When discovering stories for the first sprint, how do you know when to stop writing and move forward? I've asked a few people I know, and basically the response I've gotten is, it depends on the context the project exists in and how timeboxed the overall project is as well. Is there any standard way for knowing when to...
I would like to know what differentiates a Service class from a utility class or a helper class? A class only with underlying methods calls the dao's is a service? Doesn't the usage of Helper classes violates SRP?
Possible Duplicate: how do I write a functional specification quickly and efficiently With so many projects changing halfway - and clients assuming much can be changed at no additional cost - I would like to start writing specifications. However, I have not done this before and do not know much about the basics. Whe...
I currently live in Thailand now. I have done phone interviews with few companies in San Francisco and passed all of them. Now the problem is I have onsite interviews with 3 companies, and they are willing to pay for the flights and the hotels. I have no idea what to do right now. I don't want to fly back and forth bet...
I work at a web design shop. Our workflow is divided into two parts: frontend programmers make static html and css templates of the site design, then backend programmers tie the templates into a CMS. We have a set of common functionality for our sites, and I'm wondering if there's a unit testing framework we can use t...
Just ran across this user story form: "As a <user role>, I can <activity> so that <business value>" (source-1 and source-2) which to me seems different than what I believe to be the "standard" one: "As a <role>, I want <goal/desire>, so that <benefit>" (source-1 and source-2) (Meaning that I'd believe "I can" would b...
I have a database of nodes. Each node can have exactly one parent, but any number of children. Some nodes may be stored with no parent, but at run time, I can create a default "root" node to be the parent of these. First off, what is this data structure called? I think it's just a "tree," but I want to make sure I'm...
I have been working for a big company (8000+ employees) for almost 2 years now, and was hired just after I finished my study course. Everyone here has to deal daily with legacy code which is often very badly designed and full of hacks. At first, I kept a low profile, trying not to criticize things too much. But the sit...
There's been a buzz in my local tech community about being an 'Efficient Java Programmer' can someone explain to me what is an Efficient Java Programmer? what is their difference between average java programmers? how can you be an Efficient Java Programmer? (I am still in college, I want to get acustomed to doing the p...
Lets assume that you are working for a corporation doing a lot of IT development. What do you think should be build team responsibilities that performs 'services' for developers? What do you expect to be doing by yourselves and what tasks would you gladly pass?
I'm an experienced PHP web developer that is looking to understand the options available for streaming video. What I have: a video processing system (this one) that can provide output to various streaming servers / CDNs / HTTPs. What I want: the ability to embed streams on multiple sites, with the ability to enable/dis...
I hope this is an answerable question. Let me give it some context: I am a psychology student and a programmer. I'm going to look into creating a artificial intelligence in the form of a chatterbot. I've been looking around the web, and read about projects such as Eliza which was a first simple psychotherapy program, t...
So far I have been implementing MVVM in my silverlight app pretty well, I just had one question. I have a few User Controls that I made and was wondering if they should be placed in the Views folder or in a seperate folder call UserControls. Is a user control considered a view?
I'm a Java developer and I'm going to start working with Android to get familiar with mobile apps. I've worked with Ajax toolkits, but haven't done any mobile development. I've seen a huge change in development on certain toolkits where the learning curve really jumps up, as in GWT 1.5 versus 2.4. I'm just wanting ...
I'm developing a project in Git. IT depends on another project, that's in a Subversion repository. I'd like to be able to make changes to the Subversion project in the tree, and commit to/update from the Subversion repository from within the Git project. Is that possible?
I am using a class through a dll to which I do not have direct control. So in effect, I am only a client of this class. The class represents a form that can be printed, sent to clients and tracked in the system. I need to calculate two types of dates after which, if the form is received it is considered late. Rather t...
Are there any open source projects that have roles that would be equivalent to a Scrum product owner role? If so, how did you go about finding these examples, and how do you believe those product owner roles came to be? (Just to be clear, it's not a requirement the project is Scrum based, just that it's open source an...
What is the proper way to suggest features to be added to the C# language? For example, I would like to have an operator similar to ?? but for selecting the min or max values. I'd like a <? b to expand to a < b ? a : b likewise for >?
In MVC applied to WSGI or Java EE, is the Servlet a controller, dispatcher, or both? I think I've seen system diagrams where the controller and the dispatcher are different. Could the controller control SQL statements which should not be in the dispatcher? Thank you
Possible Duplicate: Code maintenance: keeping a bad pattern when extending new code for being consistent, or not? I'm working on a project for a Greek public organization, as a part for a course semester project. I have to develop a 3-tier application that manages financial data. A professor of mine acts as an advis...
On a related questions about "Finding and/or becoming an open source product owner" -- the first comment to the question itself was "the idea of a product owner goes against the idea of open source." Is this true, and if so, why? If not, what circumstances and/or context would it make sense for open source project to ...
I'm looking for books, online resources or suggestions about how to structure big projects or build a framework in JavaScript. I'm not looking for books explaining how inheritance or closures work. I'm more looking for design patterns and techniques to organize (and develop) complex applications. At the moment I found:...
Does anyone know a good way to get users to write a semi-decent (read: useful) bug report? We wanted to put up something that would make sense to most users (be easy to read and understand), yet give useful information to developers as well. It does not work when I click the blue button! Ahhh, I just lost a week's work...
I'm using Autumn gem to create a Ruby IRC bot for a game. However, it makes me feel rather embarrassed because I don't know how to test this kind of program... I think I should mock the IO process to have a control over it but I can't see how in this case when using the gem. Has anyone an idea ?
I've been thrown head-first into a new job developing web applications in PHP. I'm by no means new to PHP, but I haven't developed large-scale applications before. I'm wondering how to structure my development to avoid setting myself up for problems in the future. How do I design and architect my applications in a soun...
I am proficient in C, and I am learning C++ right now. I always played with websites (HTML/CSS), and I was wondering if it would be viable/practical to create some simple web apps using C and/or C++. For C it would be via CGI scripts, as explained in this tutorial for example -> http://www.cs.tut.fi/~jkorpela/forms/cg...
This seems like it would be an obvious "yes". However, I just want to be sure and I've tried googling around to no avail. I am learning Python/Django and uploading all of the projects I'm creating to GitHub. I'm starting to add in existing modules from other open-source projects that do not belong to me. Is it still ok...
We are using SQL Source Control 3, SQL Compare, SQL Data Compare from RedGate, Mercurial repositories, TeamCity and a set of 4 environments including production. I am working on getting us to a dedicated environment per developer, but for at least the next 6 months we are stuck with a shared model. To summarize our...
I have noticed that most functional languages employ a singly-linked list (a "cons" list) as their most fundamental list types. Examples include Common Lisp, Haskell and F#. This is different to mainstream languages, where the native list types are arrays. Why is that? For Common Lisp (being dynamically typed) I get th...
I'm developing a web application with a strong focus on security. What measures can be taken to prevent those who work on the application (programmers, DBAs, quality assurance staff) from capturing user entered values that should be well-protected, such as passwords, social security numbers, and so forth?
I'm starting to introduce mobile web apps to my company but my not-so-techie boss is worried about web security issues on mobile devices. I'm new in the mobile world but as a web developer I know the basics about web security (like the best practices listed in OWASP) but I don't know if there's anything else that could...
I've recently had the misfortune of hiring a developer who failed to deliver a working product by the arranged date. I have the software, but it produces errors on installation. The developer said the product works. I had wanted to give the developer the benefit of the doubt, but they have ignored all requests to show ...
Let's say I have a collection that is setup in my controller, named "things." In this collection is a heterogeneous assortment of objects. Let's say some are of type "Thing" and some others are of type "OtherThing". In the GSP page that renders this list, I want to render each different object type differently. I kn...
Help! I have a question where I need to analyze the Big-O of an algorithm or some code. I am unsure exactly what Big-O is or how it relates to Big-Theta or other means of analyzing an algorithm's complexity. I am unsure whether Big-O refers to the time to run the code, or the amount of memory it takes (space/time trad...
I have read that SICP (Structure and Interpretation of Computer Programs) is hard and HTDP (How To Design Programs) is better as an introductory course. I would say I am fairly good in maths but not a genius.So how hard is SICP, is it harder than knuth or cormen.
I have long believed (and heard from others) that keeping track of commit statistics, such as how many commits each developer makes per day, is harmful to the development process. The reason seems obvious - developers will commit in smaller increments, maximising their commit-per-day number, but making it harder to bis...
Assume an interface containing these methods : Car find(long id); List<Car> find(String model); Is it better to rename them like this? Car findById(long id); List findByModel(String model); Indeed, any developer who use this API won't need to look at the interface for knowing possible arguments of initial find() m...
I recently joined a company and it is my first job. When reading the code base, I felt that the code was not well written. It seemed to me that the code had most of the problems mentioned here and also seemed to have an Anemic Domain Model. There are no unit tests and they don't employ any code quality checking tools l...
What is the minimal set of language features/structures that make it Turing-complete?
Here is my situation (a simple example). Say I have a class called HiddenData Then I have another class called StoreHiddenData And finaly a class called OperateHiddenData Here's the thing, my class called HiddenData has private members that I don't want to be visible to the rest of the world, but I still need classes...
I'm working on a CMS that will be used by others and I'm trying to figure out what the main body of the site page should be called. Originally, I was going to call it "content" - but perhaps "body" or "page" would be better. <html> <body> .... print $content; .... </body> </html> This isn't just a question...
Note I said 'deprecated' and not 'abstracted'. Back in the days of the MFC, the WinAPI wasn't deprecated because, from what I've read, the MFC merely abstracted the WinAPI. There's a difference, for a deprecated API is one who's functionality has a newer slide-in replacement as opposed to a layer on top. I ask in light...
I realized I have a difficulty creating OOP designs. I spent many time deciding if this property is correctly set it to X class. For example, this is a post which has a few days: https://codereview.stackexchange.com/questions/8041/how-to-improve-my-factory-design I'm not convinced of my code. So I want to improve my de...
There exists an application that reports financial data of a bank to a national bank (all located in Europe). It is a legacy system that is written mainly in COBOL. Only the user interface is written in Java. The business logic is stored as complex data base tables and entries. Without knowing all internals, the system...
It is critical to know what constitutes "conveying" under LGPL v3. I am considering creating some software based on LGPL v3. The software will be used to run a web application. Now I wonder whether the "conveying" clauses would get activated if I published the modified code on GitHub to the public. I understand that n...
I'm trying to make floating point number systems a bit more intuitive for myself. There are a few things I am confused about, and I think the best way to clear up my confusions would be for someone could guide me through one question: How many numbers are there in a floating point number system (Given the base, precisi...
If a non-profit organization runs software on its website that is modified GPL'ed software and it acknowledged to be such, do they have a legal obligation to release any changes? They are not offering binaries, they're just running it and providing public service. Does it make a difference if the original software was ...
I'm working as a independent software developer for mobile applications. A customer asks me to develop a mobile app. So at the moment I'm calculating the time and effort to write an offer for this project. The app itself will only be used for a certain time as it is related to a certain event after that if will be use...
I was wondering if this was a good question to ask a possible employer when interviewing for a developer position: What is the greatest strength and weakness of your development team? We all get this question when we are in an interview, so why not ask them in return? I think it is a very good question because we cou...
At what point should I begin upgrading our developer's machines to a later Windows release? From experience, Microsoft typically has an epic fail about every other O.S. (I am really not trying to start a debate about this, it is my perception let it be) i.e. 2000 was a stable and useful O.S, yet m.e. didn't do well, xp...
Sorry if this question is not appropriate for this stack exchange site, I've never used this one before. I am doing my senior project on computer programming. I'm going to be presenting the project to classmates, teachers and (most importantly) judges, who haven't the slightest clue what programming is. My question is...
I am profoundly disturbed by a request that asks me to develop an iPad app to measure the actual size of an object using camera. It is simply not practical. Translating 2D object into 3D is never easy. I either need extra hardware, or have to make a lot of assumptions (which will almost never hold true). Regardless I ...
I'm reading "Dependency Injection in .NET" by Mark Seemann (it's fantastic, and must have) and the author often uses the word "seam". But I can't understand what it means. Here is an example of using this word: Chapter 7 explains how to compose objects in various concrete frameworks such as ASP.NET MVC, WPF, WCF...
How do you know how many programmers a particular project needs to be successful? The company I work for fulfills orders for client companies. We have written an in-house warehouse management system that handles location based inventory management, order processing, bill-of-lading generation, invoicing, freight audit...
Possible Duplicate: What have you seen go wrong when introducing SCRUM? Let me preface the question by telling you that our company doesn't have any formal "thou shalt..." processes in place right now at all, at least when it comes to the software development life cycle. Some areas are doing things fairly well (T/BD...
So I have, what would seem like a common question that I can't seem to find an answer to. I'm trying to find what is the "best practice" for how to architect a database that maintains data locally, then syncs that data to a remote database that is shared between many clients. To make things more clear, this remote data...
I have an interface method that states in documentation it will throw a specific type of exception. An implementation of that method uses something that throws an exception. The internal exception is caught and the exception declared by the interface contract is thrown. Here's a little code example to better explain...
My team and I are rebuilding a site we developed around ten years ago, and we want to do it in Agile. So after I spent a lot of time reading (probably not enough) I am having trouble with the question how to divide work between developers. I'll be more specific and say that the site is divided to separate modules that ...
I am just wondering, what exactly are the features a language or a library must provide in order for it to be defined as 'Object Oriented'. Is Object Orientation something that can, more or less, be achieved in any general-purpose programming language with decent features? Or is it something that can only be achieved i...
I'm building a site that lets users schedule interviews/conferences with third parties and I'm wondering what's the best way to provide security around the participant experience while providing the smallest usability barrier possible. Currently, I send an email with a link and a 5 digit auth-code. The link opens a pag...
What are the design problems in returning a hashtable from a public method when you want to return multiple items instead of creating a class and returning object of that? If it does have problems then under what circumstances it makes sense to do so? How does the answer to this question change depending upon whether t...
One of our external devs is leaving after successfully completing a short (1 month) project which he was contracted for. I'd like to get some feedback from him by doing an exit interview to find out what could be better in our organization and development process. What sort of questions can I ask to get detailed feedba...
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, [blah blah blah]. It's everywhere. Is there any software which expressly comes with warranties which can be taken seriously? That is: Provided by a group/company which has the resources to handle warranty claims, not uncle Bob. Assures something "use...
Software, unlike most physical products you can buy, is sold with as few warranties as the vendor can get away with. As a developer, this seems very reasonable considering the quality of almost all software I've ever used - Think anything from unintuitive idioms, via undocumented features, irreproducibility, missing ha...
Being only familiar with Mathematica and its Graphics, I have now to learn to draw Graphics using Python for a server. Mostly conditional combination of simple shape. What would be a package for Python that make drawing Graphics as close as possible as the Mathematica Graphics environment ? For Example, I would need to...
I'm starting a school group project in Java, using Swing. It's a straightforward GUI on Database desktop app. The professor gave us the code from last year's project so we could see how he does things. My initial impression is that the code is far more complicated than it ought to be, but I imagine programmers often ...
I have a web application with lots of Javascipt and CSS code. I want to minify the CSS and JS code using something like UglifyJS. However, I don't want to program with the minified code and I want my team to checkout only the non-minified code. What's the most common way of doing this? I guess you would push both the m...