instruction
stringlengths
34
19.9k
I am implementing a UI application using the MVVM design-pattern. The thing is, sometimes when you detect that something is wrong with data that was inputted by the user, you'd like to notify him somehow. The solution I used so far was to have a "messaging framework" which allows me to basically show messages in a List...
I am designing a new system and I want to know what inversion of control (IOC) is, and more importantly, when to use it. Does it have to be implemented with interfaces or can be done with classes?
I've been seeing a lot of references of Dependency Injection (DI) & Inversion Of Control (IOC), but I don't really know if there is a difference between them or not. I would like to start using one or both of them, but I'm a little confused as to how they are different.
Let's take the Facebook application as an example. Why did they develop an application when the users could just access to their page and do the same? For me that represents more maintenance and more cost because for each feature added to the web application that feature will have to be added to the smartphone applicat...
I work in a large company and most coding projects are fairly structured with a project plan and review process. However, for existing support there are occasional periods where a department will need lots of tiny changes made to an existing app or site such the accounting department at the end of a fiscal year. The pr...
I, a Java imperative programmer, would like to understand how to generate a simple version of Space Invaders based on Functional Programming design principles (in particular Referential Transparency). However, each time I try to think of a design, I get lost in the morass of extreme mutability, the same mutability whic...
I recently ran across code where the developers used both fully qualified class names AND imported class names in their source code. Example: import packageA.Foo; public class Example { public packageB.Bar doSomething() { final Foo foo = new Foo(); ... } } I was under the impression that the ...
I am currently using RDLC reports. But when interviewing for .NET jobs, they frequently ask "Have you worked with Crystal Reports?". Why do they like Crystal Reports when Visual Studio already has RDLC reports integrated?
I am creating a web app. I was testing it on a mobile browser and noticed that :active pseudo class doesn't really work. How should I simulate clicks for a mobile browser? I'm specifically interested for Android and iPhone. I am using css sprites. I stumbled upon ontouchstart but don't know how to use that. Can anyone ...
We are faced implementing a registration workflow with many branches. There are three main flows which in some conditions lead to one another. Each flow has at least four different steps; some steps interact with the server, and every step adds more information to the state. Also the requirement is to have it persisten...
I'm in a situation where there's a big project that I need a lot of background know-how to accomplish. yet I'm not moving fast enough in the research/study phase - and seeing myself off-track frequently. What it amounts to is procrastination, except it's mixed with simply being overwhelmed and delaying the necessary ba...
I want to learn more about event driven programming. Especially where and why I would consider using events. What resources/books should I consider reading to this end? (note: I'm indifferent to language. )
I have read the concepts and practiced some examples on OOAD and Design Patterns. But when I was asked to implement the singleton pattern in a little bit different manner, I was unable to do it and failed to reach my goal. I think I need some more in-depth understanding of the basics and some real experience with the c...
I come from a PHP background and I have been considering looking at DART in more detail. DART is an, open source, front-end/back-end, language for web development. PHP has a special $ (dollar) character to indicate variables: $variable CONSTANT 'string' "etc" I find that dollar sign to be really useful for speeding u...
When it comes to financial topics, I'm admittedly not well versed. I'm trying to lead my organization in our software development effort using a Scrum based development life-cycle. I am often discouraged when trying to coach executive leadership due to their belief that Scrum and Agile don't play well with their fina...
Depending on the project I'm working on, I may be required to attend more meetings with both internal stakeholders or technical management in client companies. During the course of these meetings, there will inevitably be a few questions crop up that either: You do not have an answer to. You have not thought about fo...
Is there a checklist the developer must go over before passing their work to testers? Also, what are the conditions/cases the developer must pay attention to ?
I find it frustrating how the speed of development that dynamic languages should offer gets significantly compromised by the lack of completions and other assets that IDEs would give you in their static counterparts. It's not just about typing less - it's the productivity boost and plain fun you get by browsing APIs wi...
There are now a a variety of programming methodologies: Scrum, Extreme Programming, Kanban to just name a few. Most of them combine several more basic techniques (for example frequent iterations). However, nearly all of them state that their combination of technics is the only way to write good software. I don't think...
I am starting to learn Java with the Java Trails tutorials offered by Oracle. I am in the section where it talks about passing arguments to methods The Java™ Tutorials: Passing Information to a Method or a Constructor. It says that primitive types are passed by value, which makes sense to me. Right after that it says: ...
I'm working on a webservice and I'm returning JSON. However, I'm returning a List<KeyValuePair<string, int>>, since that's all I'm really ever going to be dealing with (property => value) Now sometimes I myself will be calling these functions to aggregate the results, so I end up with something like List<KeyValuePair<s...
I'm an IT student and have been working on team based projects for several years. I've read some papers about CMMI and Scrum; this is really interesting to me and I would like to know what kind of jobs involve improving processes inside an organization. What kind of studies can lead someone towards these jobs? Manageme...
I'm dealing with a situation here on a high volume multi-tenant web app with over 100k users from companies who do not appreciate performance issues. We have a need for "real-time" updates.. we're basically sending out a request to a 3rd party system, and we'd like to see the results real-time, there's about 5 statuses...
First of all I would like to make it clear that this is not a language-X-versus-language-Y question to determine which is better. I have been using Java for a long time and I intend to keep using it. Parallel to this, I am currently learning Scala with great interest: apart from minor things that take some getting used...
There are many "flavors" of the .NET Framework: Full ("normal") Client profile subset Silverlight in web browsers "Silverlight" on Windows Phone Compact framework WinRT When C# code is needed on a new platform, it would seem that Microsot prefer to take the full CLR and strip it down to a small subset, creating new a...
I am trying to figure out how difficult/time consuming it would be to add the following feature: We have a database with our subscribers and we want to send updates to paying subscribers. The catch is that we want these updates to be date dependent. Let me clarify. Joe signed up in June last year. He has been receiving...
It's common to use '-able' as a suffix for interfaces e.g. Serializable Printable Enumerable Drinkable Shootable Rotatable I was thinking that 'Can-' might better because it may be more descriptive. Yes, it is more wordy and it adds noise to the interface name. In particular, passive verbs can be used. E.g. 1 does Sho...
I've been asked to do a small side-project to supply a simple application to one of our customers. Normally I would be working on back-end code where I have all of my testing needs figured out, and I've not yet had the dubious pleasure of writing tests for the GUI, so it's a little unclear to me how I should set up the...
For data bound controls (Repeater, ListView, GridView, etc.), what's the preferred way of binding data? I've seen it where people use Eval() directly on the aspx/ascx inside the data bound control to pull the data field, but to me, it just seems so...inelegant. It seems particularly inelegant when the data needs to be ...
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...