instruction stringlengths 34 19.9k |
|---|
I am doing legacy software programming in Visual Basic 6.0.
How do I unit test it?
|
I know what an "applicative Functor" is, but I've been reading papers recently that refer to other "applicative" things, particularly "purely applicative data structures".
The trouble is, I'm not sure precisely what "applicative" means in this context, and Google has so far failed me. I can get a general English (ie us... |
This is probably something everyone has to face during the development sooner or later.
You have an existing code written by someone else, and you have to extend it to work under new requirements.
Sometimes it's simple, but sometimes the modules have medium to high coupling and medium to low cohesion, so the moment you... |
Suppose I am working on an existing, reasonably large system. I have an object, myObject of class MyClass (for the example's sake, suppose I'm working in Java). myObject is a composition containing a Collection, say, a List and other objects which (I think) are irrelevant. It contains delegate methods which just serve ... |
I have an interface that has a certain amount of well-defined functionality. Let's say:
interface BakeryInterface {
public function createCookies();
public function createIceCream();
}
This works well for most implementations of the interface, but in a few instances, I need to add some new functionality (like perh... |
I have an assignment to implement a priority queue in C as well as make an app that uses it. I, however, only know basic-level C (I do know Java). My intuition says that I need to learn pointers.
What other stumbling blocks should I expect or prepare for? How do I go about making this secure?
|
I just saw a video showing how Notch (of Minecraft fame) is debugging and changing Minecraft while it is running. He pauses the game, changes something in the code and then unpauses the game where the change takes immediate effect without the need to restart the program.
How does this work? Which kind of technique is ... |
I'm aware that this is a rather broad question, but here it goes anyway...
What is, in your opinion, the most practical way to create own C# implementation with minor additions to the existing 4.0 feature set?
For context: I'm thinking about adding a couple of (mostly syntactic) niceties to the dynamic feature set that... |
I have the following situation. Imagine you have a MainWindow object who is layouting two different widgets, ListWidget and DisplayWidget. ListWidget is populated with data from the disk. DisplayWidget shows the details of the selection the user performs in the ListWidget.
I am planning to do the following: in MainWind... |
I am currently doing my Honours in Computer Science and taking Artificial Intelligence as a subject. As part of completing the subject I have to develop my own basic intelligent agent.
I have yet to wrap my head around what I actually have to do for this project. I am not the most technically gifted programmer and I ha... |
I have a fair amount of experience with WPF (C#) and XAML. I might soon be asked to create a Silverlight 5 application. I have no experience with any version of SL. What sort of learning curve could I expect in creating a SL 5 app, given that I have some experience with WPF?
|
I'm developing a DBMS that should be able to connect to IBM DB2 via the DRDA protocol. I found a DRDA reference manual that mentions "DRDA Implementation Programmer's Guide, SC21-9529" as a publication about DRDA, and seems that this manual is exactly what I was looking for. The problem is, I am unable to find it on th... |
I've allready created small desktop CRUD applications using Java/Swing. In hindsight I'm not quite sure if the overall design of these applications is good. I've also done some reading on MVC and looked at different Swing-tutorials.
My problem is, that I've got a very theroatical knowledge of MVC and on the other hand,... |
Possible Duplicate:
Are debugging skills important to become a good programmer?
I'm a young Java developer and I make a systematic use of the Netbeans debugger. In fact, I often develop my applications when I debug step by step in order to see immediately if my code works.
I feel spending a lot of time programming t... |
From http://www.microsoft.com/download/en/details.aspx?id=28942
ASP.NET MVC 4 also includes ASP.NET Web API, a framework for building
and consuming HTTP services that can reach a broad range of clients
including browsers, phones, and tablets. ASP.NET Web API is great for
building services that follow the REST ar... |
Assuming a system where there's a Web Application with a resource, and a reference to a remote application with another similar resource, how do you represent a bi-directional sync action which synchronizes the 'local' resource with the 'remote' resource?
Example:
I have an API that represents a todo list.
GET/POST/PUT... |
According to the wikipedia page for the MVC architecture, the view is free to be notified by the model, and is also free to query the model about its current state. However, according to Paul Hegarty's course on iOS 5 at Stanford, lecture 1, page 18 all interaction must go through the controller, with Model and View th... |
I have programmed for a few years in php and now I'm going to learn zend framwork.
Zend is very popular and there are a lot of tutorials, books and documentation out there. But I saw in the last months that there is a second version of Zend, but it's not so used and popular, not yet.
I think it is better to start with ... |
Quite often in my work the idea of 2-way data synchronisation between database systems crops up. The classic example is two slightly different CRM systems (say, Raiser's Edge and Salesforce) and the need to have a two-way sync of Contact data between them.
API considerations aside, assuming you have a shared key to syn... |
Background
So I have a REST API that allows for client applications to access and manipulate users' data.
I'm in the process of writing an Objective-C class for simple utilization of this REST API, but I'm stuck between two methods of implementation.
Method 1
class MYClient
string username
string password
m... |
I have a bit of code which uses a plugin and core model, revolving around four major objects: the Core, Server, Logger, and Parser, in slightly particular order.
The Core acts as the central factory, with a catch: it's bound to a single render context (much of this is graphics related, but the other details are not imp... |
Im not a paid developer, I spend two or three hours a day working on a development project as a hobby. As time goes by, I come up with "good-ideas" for the project, that are generally features or bug reports. I would like to manage them using a ticket database. My question is about the "scope" of a ticket. I see fr... |
How would one use the Decorator design pattern for anything other than trivial toy problems, in a deep class hierarchy? For example, let's say you have the class
class Decorated
: public Foo, Bar, Baz
{
public:
void operation();
};
You would decorate it like this
class Decorator
: public Decorated
{
void operatio... |
I am creating an application which I would like to have communicate with my website. The app will have to get data for a particular app user from the website's database. I am unclear as to the best way to do this.
I have seen one way of doing this for example is creating a login page on the app which then hits a login.... |
Is it possible to construct a parser combinator library that reads like a BNF grammar? I don't know of any, so I started wondering if there are reasons it's impossible or undesirable to do so. It seems to me it would be the best of both worlds.
Functional languages such as F# allow operator overloading. Is it just a ma... |
How is it legally possible to take a project initially released as open source back to closed source? Especially one licensed with the GPL any version.
|
Most of programmers who are involved into development of more or less large project(s) know how annoying the process of compilation can be. There are some other things which are dependent on compilation, for example unit tests. TDD requires tests to execute fast, otherwise developers tend to run them rarely.
The proces... |
I've a c# file that will contain, most likely 10,000+ lines of code. I'd like to break this file into tabbed segments, so I can organize each method into a certain tab and label the tab something like : initial setup, helper functions,execution logic,list structures,global variables, etc.
If I were using PHP I would h... |
We have an app that's currently only got about 120 users. The userbase will probably grow by 50% over the next 12 months - but we're going to have to separate storage etc. because we're looking at several TB of data. Later this year, we will move to cluster based hosting. The app will also be provided in multiple langu... |
After having worked with a Microsoft stack - VB.Net, ASP.Net, SQL Server - for the past 10 years, we are now faced with having to develop an application for both Windows and Mac environments.
It has been suggested that MySQL, for the database, is available on both platforms.
I've been under the impression that MySQL is... |
Do they mean the same thing (attaching URLs to actions, or actions to URLs) or is there any difference I'm missing?
Example: http://github.com/dannyvankooten/PHP-Router vs. http://konstrukt.dk
|
Until today, I have always used the terms open source and open source software interchangeably. But then I read Phil Haack's blog post in which he suggests that the two terms are not necessarily referring to the same thing. He proposes the following definitions:
Open Source Software is source code which is licensed un... |
Coding a new website. Basically, for position elements using CSS I would use percents and figured that was the best thing to do since everyone's monitor was a different size. But I noticed a lot of big websites use pixels.
I don't understand how you can use pixels to position things since we all have a different size s... |
I 'discovered' interfaces and I started to love them. The beauty of an interface is that it is a contract, and any object that fulfills that contract can be used wherever that interface is required.
The problem with an interface is that it can't have a default implementation, which is a pain for mundane properties and ... |
We recently had a discussion in the office because of conflicting views between developers. One side (side S) argued technical solutions -generally- need to be a specific as possible, while the other side (side G) argued generalized solutions are preferred.
I'll try to keep it short; we deal with file transfers and we ... |
It is my perception that whenever new JEE projects start (where these technologies would be applicable), people prefer to use a combination of Spring + Hibernate instead of EJB 3.
It seems junior programmers are even advised to go for that instead of EJB.
Is this personal preference or are there pertinent reasons for i... |
I've city names, like Newyork. Somebody may misspell it and write it as Newyoork. I want an algorithm or library which can match such patterns with some confidence level.
Any idea how to do it or if any pattern recognition library is present?
It is same as when we type something in Google with spelling mistake in it bu... |
Can someone confirm good performance using PHP + Java webservice (for heavy duty tasks) running on NGINX (or Apache) because PHP is slow in completing some heavy tasks and I want to make a web service in java to communicate with PHP via SOAP or REAT or JSON.
The fact I'm asking this question is that I already know PHP ... |
The Top 10 programming languages, according to the TIOBE index seem to be heavily influenced by C:
1. Java
The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. - wikipedia.org
2. C
C is one of the most widely used programming languages of all time and ... |
Problem:
I'm working on coding a few light-weight touch-tablet games and often get stuck with difficulties naming my user interaction/interface classes and their relationships with each other (architecture?). I'm rarely satisfied with any of my solutions, thus doubt and change them several times on down the line. For ... |
I'm going to develop a Kakuro (Cross-Sums) game for Android, and have got the algorithm right.
But I can't seem to get the user-interaction part right- i.e. The puzzle is very large. So only a portion is shown at a time to a user depending on their device (eg: HVGA smartphone vs XGA tablet). It should be scrollable.
To... |
I am familiar with writing Software Requirements Specification, but not quite sure how to write the requirements for a specific module.
Let's say I need to develop a Reservation System and there will be a module to perform validation. Now, an SRS is already available for the entire system, but prior to designing(API S... |
I'm basically looking for arguments to persuade the internal "consultants" at work as the following are not working:
What happens if you do a Cartesian join and crash the server?
You don't need to do selects from that server. You have other servers for that.
It's not for you it's for the clients.
We're going to be im... |
For a mobile e-commerce site, that follows the client-server model, where all the views are json-ajax calls to return data from a secure service, is it safe to also pass the "checkout" process through an ajax call?
The entire site is presented by making json-formatted ajax calls to the service (which is controlled). Bu... |
I have the following pattern, which I would like to implement using some kind
of generic programming, but I do not see how I can do it.
I have an interface I containing many methods with different signatures.
Each method has a return type of some class type and any implementation should return null on failure, or a con... |
I'm about to create an open source desktop application. I'm primarily a .NET developer , with experience in ASP.NET and SharePoint. I've created basic Windows Forms applications before, but I have never developed using WPF or Silverlight before. I want a compelling, highly interactive UI for my desktop application. ... |
Our team is developing a project using an Agile development process. All of our requirements are converted into product backlog items and task are broken down based on that. One of my team member suggested to maintain the High Level Document (HLD) and Low Level Document (LLD) for the requirement.
Do we need to have th... |
Say I have a mobile application that allows users to enter information which is then uploaded to a central location. I had planned on building this using only HTML5 and javascript (non-native app), but I'm assuming if someone is in an area where there is no service they simply will not be able to use the app.
As a wor... |
I am responsible for a software project for a few years now (a Java desktop application, which is mostly event-driven). I started it from scratch, and at the beginning of this project I made some strong choices on the architecture of the software.
My architecture
I introduced the Module class, which represents a functi... |
After reading Tom DeMarco's Slack, I'm wondering how to factor slack into sprints.
For those who haven't read the book, TDM describes 'slack' as providing time for innovation and other good things.
Scrum leans towards eliminating slack and resisting change within the sprint. Allowing stories to be re-prioritised betwee... |
My current application is running into issues with its ORM, and we're relying on some pretty hairy SQL to express queries that the ORM can't. Are there best practices in terms of how to manage the SQL queries? For example, where do these usually live in relation to other parts of the code? Are they in separate .sql ... |
I'm building a content management system, and need advice on which theming structure should I adopt. A few options (This is not a complete list):
Wordpress style:
the controller decides what template to load based on the user request, like: home page / article archive / single article page etc.
each of these template... |
Is it good to use databinding to Entity Framework's Entity in WPF?
I created a singleton entity framework context:
To have only one connection and it won't open and close all the time.
So I can pass the Entity around to any class, and can modify the Entity and make changes to the database.
All ViewModels getting the ... |
I need to give a presentation to a coworker on some of the best practices regarding reports. Right now I use jaspersoft's iReport to do my reports and I need to give some input to a coworker. I'm looking for some general knowledge and insight on the topic.
|
I was looking over some old code that I wrote. It works, but it's not great code. I know more now than I did at the time, so I could improve it. It's not a current project, but it's current, working, production code. Do we have a responsibility to go back and improve code that we've written in the past, or is the c... |
I'm making an IRC bot in PHP. And I've come to the point when I need to determine how would user permissions/accesses would look in the database (and in the application in general).
Here are the requirements:
There are global and local permissions, global are for all channels, while local are channel specfiic.
There a... |
I'm a one man software start up and need to consider a software maintenance retainer contract for a client.
What is this, in simple terms? How could it benefit me or my client?
|
I was recently reviewing some of my code and noticed that in a fit of absent-mindedness, I'd left a structure like the following:
$guid = empty($subscription->guid) ? : $subscription->guid;
Now, this wasn't doing what it's supposed to and is wrong, but since that property is always set now it was working fine, and th... |
Is there a book out there that's the de-facto standard for describing best practices, methodologies, and other helpful information on gathering requirements for software and database projects? What about that book makes it special?
|
I have an argument with a collegue of mine regarding the C++ guidelines to follow.
He currently designs all his libraries that way:
He uses inconsistently uppercase and lowercase letters in his filenames
Some of his headers don't have any extension
I believe that having no extension is something reserved for C++ stan... |
This question talks about any and all free public raw data which appeared to have valuable pieces but nothing that really provides what I am looking for.
Instead of using a socially defined listing of businesses (foursquare), I would like a business listing data set of registered businesses and associated addresses th... |
I'm building site with a very simple data structure: documents that are nodes that reference other nodes that each have arrays of parents, children and siblings, so the structure is:
Node:
uuid
name [string]
description [string]
children, parents, siblings [arrays of node uuids]
What is most important is making the fo... |
I'm doing a course in college, where one of the labs is to perform buffer overflow exploits on code they give us. This ranges from simple exploits like changing the return address for a function on a stack to return to a different function, all the way up to code that changes a programs register/memory state but then r... |
Possible Duplicate:
Why is it so difficult to make C less prone to buffer overflows?
I'm doing a course in college, where one of the labs is to perform buffer overflow exploits on code they give us. This ranges from simple exploits like changing the return address for a function on a stack to return to a different f... |
I'm doing a java project. My main structure contains 2 lists with elements of type A the other type B. B itself contains a list of objects which may contain elements of A.
It must be that when an element from list of A is removed it must be removed from all subelements in list B. also if an possible member of list A i... |
I realised I have a massive knowledge gap when it comes to multi-threaded applications and concurrent programming. I've covered some basics in the past, but most of it seems to be gone from my mind, and it is definitely a field that I want, and need, to be more knowledgeable about.
What are the best resources for learn... |
We all have it, problems that prove difficult to fix and working out a fix through obscure code and bizarre unexpected functionality. Slowly, logically working your way through trying to find patterns, errors, mistakes. This process takes time and the issues are often not easily understood by the client.
How does one a... |
For the sake of an exercice I want to aggregate price listings with prices coming from a series of web sites in a structured form (XML, JSON...). If I have control on both sides how can I go about making price updates the most efficient possible?
Edit: To clarify, I'm looking for a more efficient approach then having a... |
I want to make sure I'm following industry standards and best practices with my first real crack at MVC. In this case, it's ASP.NET MVC, using C#.
I will be using Entity Framework 4.1 for my model, with code-first objects (the database already exists), so there will be a DBContext object for retrieving data from the d... |
The MVC design pattern is supposed to led itself to separating business rules from presentation.
But sometimes business rules AFFECT presentation. What is the best way to deal with this? Is that when a ViewModel should be used?
For example, going back to my non-existent Library application, a librarian is scanning re... |
I'm a beginner in programming and I've been reading books, studying, reading articles, and whatnot. I'm getting great results since I've started learning programming, and when I was a beginner I used to think I knew everything about programming, but as I learned more I realized how difficult this field is (In fact all ... |
Apparently, a composite design pattern represents individual entities and collective entities in the same manner.
What is the advantage to this? For instance, if I subclass a class, why would I want to treat objects of both classes in the same way?
For instance, if 'tuna' is a subclass of 'fish', why would I want to ha... |
I was doing a small list of PHP MVC framework (like Zend, CakePHP, Yii etc...) and I noticed that all of them are open source.
Then I tried to find some proprietary framework, but my research was unsuccessful.
Is there any proprietary PHP MVC framework? Why they are so few(if there is any)?
|
For the past few years I started wondering if it makes sense to learn advanced techniques in some fields of IT, or is it better to be just good at everything, and use the simplest code possible everywhere.
I will use C++ as a language for comparisons, since I'm a C++ developer.
As a C++ developer you can write truly in... |
Asynchronous non-blocking event driven programming seems to be all the rage. I have a basic conceptual understanding of what this all means. However what I'm not sure is when and where my code can benefit from being asynchronous, or how to make blocking IO, non-blocking. I'm sure that I can simply use a library to do t... |
Let's say that I want to build some utility functions to do some basic maths with the BigDecimals, for example I want to have a function that computes the average of a List<BigDecimal>.
What is the best approach? A static function or a utility class?
public static BigDecimal computeAverage(List<BigDecimal> numbers)
or... |
I am am trying to learn JAVA on my own. In one book I am reading the author says there is no convention for writing a correct setter. His example would go something like this:
public void setUnitCost(double inUnitCost) {
unitCost = inUnitCost;
}
However, when using Eclipse, and tell it to create getters and set... |
I want to present the concept of mixins and their implementation in .NET.
The way they work in .NET is you add extension methods on an interface and decorate classes with said interface.
What would be the best examples for this pattern (other than linq)?
|
The "GPL How to" has the following to say about applying copyright notices of code copied from other programs:
If you have copied code from other programs covered by the same
license, copy their copyright notices too. Put all the copyright
notices together, right near the top of each file.
I did a total refactori... |
Lines from CLR via C#:
A managed module is a standard
32-bit Microsoft Windows portable executable (PE32) file or a standard 64-bit Windows
portable executable (PE32+) file that requires the CLR to execute. By the way, managed
assemblies always take advantage of Data Execution Prevention (DEP) and Address Space
Layout ... |
I know very little about smart card authentication in general so please point out or correct me if anything below doesn't make sense.
Lets say i have:
A Certificate Authority "X"-s smart card (non-exportable private key)
Drivers for that smart card written in C
A smart card reader
CA-s authentication OCSP web servic... |
I've read through most of Fowler's Refactoring book and have refactored many applications in my past big and small.
One of the harder things I find to teach is "when" to refactor. I tend to do this based on a gut feel which has served me remarkably well in the past. However, when getting into discussions with people ... |
I'm planning to add a couple of usage statistics to my web application. Some common things like: registered users, amount of comments/posts, etc. over time (last 24 hours / last week / last month / last year) which I want to display graphically to all admins.
I know that I can retrieve all information from database que... |
Just out of curiosity, what language is the CLR written in? I read on the Java Virtual Machine wikipedia entry that it is programmed in C++; is this the same for the CLR?
Sorry if this is off-topic, I didn't feel that this question was technical enough to go on Stack Overflow.
|
Possible Duplicate:
Ideas to get you programming mojo back?
Its almost 10 years for me working in Java based applications (mainly on Web). Sometimes I feel really bored of the regular work...same old problems, similar challanges etc. Since I work for a company that provides services to different customers, I change ... |
I am not able to find the right technical term to mention child or instance of a template.
What's the right one, child or instance or something else I am not aware of?
Sorry for my unclear original question.
Its not related to any language. The Template I am talking about is a business concept in my application.
Say f... |
I have inherited a small project and want to extend it and stabilize it at the same time by writing Unit Tests for all the new code I am adding. The first class, TypedAudioCreator, creates audio files and this turned out to be very easy to test first and write code for second.
However, when it came time to write TypedA... |
Let's say I'm designing a custom data structure like a stack or a queue (for example - could be some other arbitrary ordered collection that has the logical equivalent of push and pop methods - ie destructive accessor methods).
If you were implementing an iterator (in .NET, specifically IEnumerable<T>) over this collec... |
It's widely known that the name "JavaScript" is trademarked by Oracle (formerly a trademark of Sun, formerly a trademark of Netscape).
However, others seem to have no problem using the JavaScript trademark. Google uses it in reference to V8, Mozilla uses it in reference to SpiderMonkey and in various other places, etc.... |
First of all, is not a programming matter, is a programmer afair.
I'm the new web programmer in my company.
I'm here just for 2 weeks. And they want me to teach Wordpress, configure & install it, and things like that.
But they have a intranet too to make all the compatibility stuff, tracking clients, ordering event, au... |
Why was the dependency injection pattern not incluided in the gang of four? Did GOF pre-date widespread automated testing? Is dependency injection now considered a core pattern?
|
I am new to Entity Framework.
I know there is an option to update model from the database, but I want to know how easy and successful is this task. I may need to update my model in a few weeks but till that time many lines of code has already been pushed inside.
Is it difficult to track changes and make code work?
|
We've recently started to write tests for our fairly large PHP code base - using PHPUnit we are writing unit and integration test for our models and controllers.
What's the concensus in setting a boolean toggle that states whether a class is in TEST_MODE that alters the behaviour of a method?
ie: An email helper functi... |
Will my site be automatically indexed, or search ranking affected based on my use (or non use) of the Google/MSFT CDN?
My clients will be sending them the referrer header which I may or may not want included in search results.
|
I'm working on a report which needs to explain in non-technical terms the effects of a cumulative error, and why it is of importance to use absolute calculations.
Definition of 'cumulative error' from dictionary.com:
an error that gradually increases in degree or significance during a
series of measurements or calcu... |
So say we have an app (server) that somehow attaches to itself plugins (services) in form of .dll or .so libraries. Is there any nice short name for such server behaviour model?
|
I can search and I've already looked at the wikipedia entry and in some other places, but even though I have some programming experience, I don't really grasp the concept. Can you treat me like a 10 year old and give me a clear explanation on socket communication?
|
Since learning (and loving) automated testing I have found myself using the dependency injection pattern in almost every project. Is it always appropriate to use this pattern when working with automated testing? Are there any situations were you should avoid using dependency injection?
|
My boss has tasked me with a re-write of our intranet website. The existing system is very old PHP that doesn't use a framework. My preference is strongly to do the rewrite in Python and Django but my boss does not like Python syntax (he is also a developer). I'm on the opposite end... I don't like developing in PHP an... |
I've been working on a medium sized web application that makes very heavy use of javascript. I tend to introduce common errors per 10 lines of code with either an unknown variable name or function name from another module\namespace or forgetting a return and other common errors.
I'm noticing I'm getting quite a lot of... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.