instruction stringlengths 34 19.9k |
|---|
Possible Duplicate:
“Comments are a code smell”
I am a graduate software developer for an insurance company that uses an old COBOL-like language/flat-file record storage system. The code is completely undocumented, both code comments and overall system design and there is no help on the web (unused outside the indus... |
From Polymorphism on WIkipedia
In computer science, polymorphism is a programming language feature that allows values of different data types to be handled using a uniform interface.
From duck typing on Wikipedia
In computer programming with object-oriented programming languages, duck typing is a style of dynamic ty... |
I know there are going to always be differences depending on the particular size, staff etc, but i wanted to get feedback in general around:
In an environment where you have a production support team doing first line support and release management, is it better to simply have developers manage their own releases instea... |
I have a Compaq nw8440 with a smart card reader that is:
Compatible with ISO 7816 compliant Smart Cards. PC/SC interface support
I have been interested in smart cards and wanted to start playing around with them. If I wanted to get in to programming smart cards where can I find resources on how to do it, and would I ... |
Possible Duplicate:
Why programming open source?
I'm having trouble understanding why people dedicate their time to an open source project that's free as in beer instead of focusing on a closed source, paid project.
Closed source projects seem to be more commercially viable, so why do programmers open source their c... |
This question is in conjuction with How would you approach developing a Hotel Reservation System?
The solution to a system with different interfaces (or clients I should say) is to go with developing a Web service and have other systems interact with it.
I never had the requirement for developing a Web service so I am ... |
We're making a bespoke software for our client and use Codebase for our project management. Is it a good idea to let our client view our project management board?
The advantages that we thought of are that this would enhance the cooperation between the client and the dev team, following agile practices. He would essent... |
English in not my native language, therefore it is a little more difficult to pick a good name for a namespace. One example to make you see my problem a bit better:
We have a set of classes that have to do with the way a company is organized (we can create organizational charts with it). Currently the namespace is CFW.... |
I have learned in Agile Development that:
Refactoring is the process of clarifying and simplifying the design of
existing code, without changing its behavior.
I have heard about some GUI refactoring tools like ReSharper and DevExpress Refactor Pro!
Here are my questions:
How does it takes place in the Softwa... |
let's start off with the problem statement:
My iOS application has a login form. When the user logs in, a call is made to my API and access granted or denied. If access was granted, I want the user to be able to upload pictures to his account and/or manage them.
As storage I've picked Amazon S3, and I figured it'd be a... |
It is also true that a system may become so coupled, where each class
is dependent on other classes that depend on other classes, that it is
no longer possible to make a change in one place without having a
ripple effect and having to make subsequent changes in many places.[1]
This is why using an interface or an abst... |
Possible Duplicate:
if I use .NET Framework for my application, do I have to pay anything to Microsoft?
I have developed a desktop application called "Institute Management System" which has modules like Class manager, Subject manager, Topics manager, Student inquiry manager Student admission manager, Fees manager, E... |
I just started with functional programming (with JavaScript and Node.js) and from the look of things it looks as if the code I am writing would grow to be one hell of a code base to manage, when compared to programming languages that have a sort of object oriented paradigm.
With OOP I am familiar with practices that w... |
I want my scribbles of a program's design and behaviour to become more streamlined and have a common language with other developers.
I looked at UML and in principle it seems to be what I'm looking for, but it seems to be overkill. The information I found online also seems very bloated and academic.
How can I understan... |
Possible Duplicate:
How do you dive into large code bases?
I have quite a bit of experience with different programming languages and writing small and functional programs for a variety of purposes. My coding skills aren't what I have a problem with. In fact, I've written a decent web application from scratch for m... |
Possible Duplicate:
Data input validation - Where? How much?
I'm a new PHP developer and am into Powershell quite a bit but this question is language agnostic. I've been questioning my code quite a bit lately thinking about how many nets I should setup to catch exceptions, verify results, etc. I realize that I cou... |
This is one of the bonus questions in my assignment.
The specific questions is to see the input list as a set and output all subsets of it in a list. We can only use cons, first, rest, empty?, empty, lambda, and cond. And we can only define exactly once.
But after a night's thinking I don't see it possible to go throug... |
I'm working on a middle-tier project which encapsulates the business logic (uses a DAL layer, and serves a web application server [ASP.net]) of a product deployed in a LAN. The BL serves as a bunch of services and data objects that are invoked upon user action.
At present times, the DAL acts as a separate application w... |
As I thought about writing an operating system, I came across a point that I really couldn't figure out on my own:
Can an operating system truly be written in an Object-Oriented Programming (OOP) Language?
Being that these types of languages do not allow for direct accessing of memory, wouldn't this make it impossible ... |
Possible Duplicate:
Best way to estimate cost related to porting code from language A to language B?
We have an MFC C++ program with around 200,000 lines of code in it. It's pretty much finished. We'd like to hire someone to convert it to work for Macs, but we are not sure how to properly estimate a reasonable time... |
I'm looking to create a game in Java and would like it to work on Windows, Linux, and Mac. I'm pretty sure C# is a bad choice for this, and I don't have enough experience in C or C++. I want to stay away from Flash. Therefore, is Java a good choice for me? Mostly, I use C#, and think that Java is similar, so I assume i... |
I came across a question which asked the difference between Function Templates and Template Functions in C++ and also Template Classes and Class Templates.
I was under the impression that Function Templates and Template Functions were the same thing. Is there any difference between the two, if so what is it?
|
So I am trying to develop an activity feed for my site. Basically If I UNION a bunch of activities into a feed I would end up with something like the following.
Chris is now friends with Mark
Chris is now friends with Dave
What I want though is a neater way of grouping these similar posts so the feed doesn't give inf... |
I read Kruskal's algorithm as it's presented on Wikipedia. There, it says that it's an algorithm in graph theory that finds a minimum spanning tree for a connected weighted graph.
But while going through the examples that illustrate this algorithm I am unable to understand why the loops are avoided by marking some of t... |
Most of times I get to know about the new features too late. It is okay at least I know about them does not matter from where I know But I feel it is too late to know about those features.
I am working on LAMP platform and I want to keep myself up to date with the new things, anything happening new with LAMP.
Can you ... |
In my code I check the current version of the software on launch and compare it to the version stored in the user's data file(s). If the version is newer, then I call different methods to update the old data to the newer data version, if necessary.
I usually have to make a new method to convert the data with each upda... |
I want to create a service where people can upload files. However, since file storage costs money, I want to compress the files so they take less space. I would want to write my own compression algorithm, however, PHP doesn't have good ways to handle binary data (which is needed for many compression algorithms). So I w... |
My understanding is that:
MIT-licensed projects can be used/redistributed in BSD-licensed projects.
BSD-licensed projects can be used/redistributed in MIT-licensed projects.
The MIT and the BSD 2-clause licenses are essentially identical.
BSD 3-clause = BSD 2-clause + the "no endorsement" clause
Issuing a dual license... |
I am trying to figure out why we need URIs for XML namespaces and I cannot find a purpose for that. Can anyone brighten me a little showing their use on a concrete example?
EDIT:
Ok so for instance: I have this from w3schools
<root
xmlns:h="http://www.w3.org/TR/html4/"
xmlns:f="http://www.w3schools.com/furniture">
... |
What is the name of the pattern in which individual contributors (programmers/designers) developed an artifact for the sole purpose is to serve as a diversion so that management can remove that feature in the final product?
This is a folklore I heard from an ex-colleague who used to work at a large game development com... |
I've seen the book Working Effectively with Legacy Code recommended a few times. What are the key points of this book?
Is there much more to dealing with legacy code than adding unit/integration tests and then refactoring?
|
When working in a TDD or BDD manner your unit tests are supposed to drive your design. But how do you end up with event-sourcing using a xDD techniques? As I see it event sourcing is something you need to adopt early on to take full advantage of it.
Lets say that you start without event-sourcing and do a release. Late... |
I am just starting out learning Visual Basic 2010. I have books and videos. The books all seem to be written for people who have some programming experience, even the books that say they are for beginners.
The videos were great until they started talking about variables. I got the basics of them but they started into... |
How do you stay backward compatible with event-sourcing? Let say you release a version that has one kind of event, let call it X. You know how to handle that event in all the systems that extracts the events from the event source. In a later release you make a change to event X or delete it, how do you stay backward co... |
Original Question
I already did some interviews for my company, mostly computer scientists for dev positions but also some testers and project managers. Now I have to fill a vacancy in our research group within the R&D department (side note: “research” means that we try to solve problems in our professional domain/mark... |
Possible Duplicate:
A simple ways to improve the release quality in RAD environment
This is year 3 and product is selling good enough. Now we need to enforce good software development practices. The goal is to monitor incoming bug reports and reduce them, allow never ending features and get ready for scaling 10x.
Th... |
I was curious about GUI design patterns, so I searched and got some information, including a list of UI patterns for the web. This UI patterns website says that:
UI Patterns is a growing collection of User Interface Design
Principles and User Interface Usability Patterns present on web
applications and sites today... |
DR-DOS, Plan, BSD, Sun Solaris, HP/UX, OpenServer.....and so on.
Why high-tech OSs (like UNIX family) are mostly command based (rather than GUI based)?
|
I'm trying to figure out what are the key technological innovations or inventions that the "cloud" introduces as an improvement over web pages; or maybe over SAAS.
Seems to me that "cloud" is merely a new marketing word for technology that's been around for a while.
|
I decided to improve my knowledge in template meta-programming. I know the syntax and rules and been playing with counteless examples from online resources.
I understand how powerful templates can be and how much compile time optimization they can provide but I still cant "think in templates", I can't seem to know by m... |
I recently found a website called Mathway
Basically, it works by allowing you to choose your "level of math" (which it uses to determine what tools it should provide to you) and then allows you to input a math problem which it then solves for you, and gives you detailed solutions (you have to try it, it's really cool).... |
A few months back, I was doing some recreational reading at the iOS Dev Center, and I came across a small list of guidelines for free vs. paid apps. It included guidance along these lines:
How not to promote a paid version within a free version
Not displaying "placeholder" buttons in a free version that "work" in a pa... |
Throughout my career I had worked at companies that had a collection of different environments for different purposes. We always had more or less our desktop environment, a test environment, a QA environment, a staging environment and a production environment. This went for both servers/applications and any data source... |
I'm looking to offer the user some way of changing how a single page looks based on some pre-defined jsps.
i.e. Two or more jsp's contain similar information, and would be backed by a single controller method. The controller would decide which view to return.
Is there a common way of achieving this?
At the moment I ha... |
I work on a small team of devs, 4 guys. They have all used source control. Most of them can't stand source control and instead choose not to use it. I strongly believe source control is a necessary part of professional development. Several issues make it very difficult to convince them to use source control:
The tea... |
I've seen a number of comments across the web Perl's smart-match operator is broken.
I know it originally was part of Perl 6, then was implemented in Perl 5.10 off of an old version of the spec, and was then corrected in 5.10.1 to match the current Perl 6 spec.
Is the problem fixed in 5.10.1+, or are there other proble... |
In every example I have seen yet almost all of the GUI code is written in the start(Stage stage) method of the main class. Is this the best approach, or is it OK to subclass the Stage class and make your own thing? If the latter is OK, wouldn't the performance suffer because of lot of Stages?
|
I was looking for a pattern/solution that allows me call a method as a runtime exception in a group of different methods without using Reflection. I've recently become aware of the Abstract Factory Pattern.
To me, it looks so much like polymorphism, and I thought it could be a case of polymorphism but without the super... |
So, I've sort of reached a point where I want to start developing a website. Originally, I planned to build said website using PHP and CodeIgniter, I'm familiar with both, but, truth be told, I'm not too fond of either. I find they just get rather messy, CodeIgniter helps somewhat, but no matter what, it seems that mos... |
If you have a list of items and you want to randomly pair the items in the list together, what kind of algorithm would you use to do that, such that the items can only be matched to one other item.
|
The reason I ask this is because isn't a PHP script a route? For example, if you have an article.php then your route is simply http://mysite.com/article.php.
Why further abstract away the concept of a route when it already exists as a simple file?
|
Given how much simpler jQuery development is, when compared to native JavaScript, what makes people forgo libraries like jQuery altogether?
Is this because jQuery has limitations or it is slow? I mean, if jQuery is so easy compared to native javascript, what reasons do people have to still use pure javascript?
|
I am just curious why in the C programming language the function to read formatted input was called "scanf" as opposed to "readf". I assume it is derived from an earlier language, so in that case why was it named that way in the earlier language? (Recurse.)
Also, why "printf" rather than "writef"? In languages other ... |
I often heard the claim that dynamically typed languages are more productive than statically typed languages. What are the reasons for this claim? Isn't it just tooling with modern concepts like convention over configuration, the use of functional programming, advanced programming models and use of consistent abstracti... |
There are more than a few questions that hop into mind when someone thinks about Google's indexing services. Jeff Atwood wrote about them at The Elephant in the Room: Google Monoculture and Trouble In the House of Google.
I have two questions:
How does google index dynamic websites?
This site has dynamic pages, QUEST... |
I am studying for a final exam and I came past a question I had on an earlier test.
The questions asks us to find the minimum value in an unsorted array of integers. We must provide the best upper bound and the best lower bound that you can for the problem in the worst case.
First, in such an example, the upper and low... |
I am writing a program to simulate the activity of ants in a grid (PDF). The ant can move around, pick up things and drop things.
The problem is while the action of the ants and the positions of each ant can be tracked by class attributes easily (and we can easily create many instances of such ants) my client said that... |
How does the traditional if statement compare with that of the immediate if statement (IIF, the one usually written as condition ? value_if_true : value_if_false) in terms of speed of execution?
Also, in what scenarios should we be ideally using the IIF?
|
Example:
foobar = new InputStreamReader(p.getInputStream(), "ISO-8859-1");
Since the encoding is hardcoded and correct, the constructor will never throw the UnsupportedEncodingException declared in the specification (unless the java implementation is broken, in which case I'm lost anyway). Anyway, Java forces me to de... |
look at these calls closely:
printf("hello, world\n");
printf("%d", 2);
printf("%d%g\n", 2, 2.3);
we see that printf can accept any type and any number of args.
however we know that functions in c only take fixed length args and should have a compatible prototype to match the arg.
what would be the prototype of printf... |
Let's says that I am creating a PHP library that is using PHP 5.3 and namespaces and my library requires another library to work (this case it is the sfYaml library). I am trying to think of the best way to include this library.
Is it considered good/acceptable practice to include the third party libraries directly in ... |
In database schema's, I often notice VARCHAR sizes are rounded to the byte offsets 128/256 or 4096. I've done it before as well, and the idea behind it was probably something with efficiency.
However, is there still a valid reason to do so nowadays?
I often use '50', '100' or '200' as VARCHAR sizes these days,
as they ... |
I just read about the facade pattern and found this example where a client (user of a computer) invokes a startComputer() method which calls on all the complex stuff:
Source: wikipedia
/* Complex parts */
class CPU {
public void freeze() { ... }
public void jump(long position) { ... }
public void execute(... |
After searching on the internet for performance improvements when using Visual Studio 2010 with a solid state hard drive, I heard a lot of different opinions.
A lot of people said that there isn't really a benefit when using a SSD, but in contrast others said the exact opposite. I am a bit confused with the contrasting... |
Is this good or bad design to add, by default, ID field in every table in a database, even when you don't see currently to usage of this ID (For instance in a MxN table) ?
|
Consider an USB device that is receiving data over a wireless network and an application running on the PC is reading this data. Now, on many languages (consider C# DataReceived), we have event handling mechanisms to detect if Data has arrived or not.
My question is, how is this event detecting mechanism implemented?
I... |
I would like to put a program together to calculate the number of 60' pieces would be needed from a list of shorter pieces. For example, I sell rebar cut to length from our standard length of 60'-0". Now the length the customer requires are as follows:
343 pc @ 12.5'
35 pc @ 13'
10 pc @ 15'
63 pc @ 15.5'.......
Ther... |
Update: We are a very small team (3 people) and thus I (Scrum Master) and the Product Owner are also developers doing some coding.
We are aware of this situation and we are actively trying to recruit some new talents. But it's hard!
Meanwhile... we need to adapt... so my question:
The Product Owner complains about ha... |
I started a programming blog earlier this year, and since I started it some things have changed. Some changes are due to technology changing, some changes are due to my code libraries improving, and some (ok, probably most) are due to me changing as I learn more.
I want to go back and completely re-write certain blog p... |
I'm interested in adopting a tool/scripting language to automate some daily tasks connected with fighting forum spammers. A brief overview of these tasks: analyze new registrations and posts on a phpBB forum, and delete or deactivate spammers using a website/community that collects such spam reports.
Typically such au... |
I'm looking for the most efficient / standard way of passing data between client-side JavaScript code and C# code behind an ASP.NET application. I've been using the following methods to achieve this but they all feel a bit of a fudge.
To pass data from JavaScript to the C# code is by setting hidden ASP variables and tr... |
After coding for many years as a solo programmer, I have come to feel that most of the time there are many benefits to write private member functions with all of the used member variables included in the parameter list, especially development stage.
This allow me to check at one look what member variables are used and ... |
Is browser fingerprinting a sufficient method for uniquely identifying anonymous users? What if you incorporate biometric data like mouse gestures or typing patterns?
The other day I ran into the Panopticlick experiment EFF is running on browser fingerprints.
Of course I immediately thought of the privacy repercussion... |
I was reading Ben Cherry's "JavaScript Module Pattern: In-Depth", and he had some example code that I didn't quite understand. Under the Cross-File Private State heading, there is some example code that has the following:
var _private = my._private = my._private || {}
This doesn't seem to be different from writing som... |
I don't know whether this question is reasonably answerable (and therefore will be closed), but I will take my chances: What are the possible problems (and solutions), one might encounter, when developing query mechanism for key/value store/database (like redis for example)? All the values will consist only of JSON doc... |
I'm working on a thick client graph displaying and manipulation application. I'm trying to apply the MVC pattern to our 3D visualization component.
Here is what I have for the Model, View, and Controller:
Model - The graph and it's metadata. This includes vertices, edges, and the attributes of each. It does not cont... |
Consider this example:
I have a website. It allows users to make posts (can be anything) and add tags that describe the post. In the code, I have two classes that represent the post and tags. Lets call these classes Post and Tag.
Post takes care of creating posts, deleting posts, updating posts, etc.
Tag takes care of... |
I wrote a fair amount of code for a startup, but I haven't signed a contract before doing so.
The only document that I signed with them does not mention the fact that I have to pass the rights on the code to them, and after a consulting with a lawyer it seems that I own the full rights.
Now I want to preemptively corre... |
I am using Entity Framework as my ORM in an ASP.Net application. I have my database already created so ended up generating the entity model from it. What is a good way to organize files/classes in the data access layer. My entity framework model is in a class library and I was planning on adding additional classes per ... |
Some open source licenses don't allow its usage in commercial products, but I bet some people/companies use it anyways.
Is it possible to prove that a closed source, commercial product illegally incorporates open source code? If so, how?
Example: Say Microsoft just gets the Linux kernel, slaps a new GUI on top of it an... |
We're writing a requirements document for our client and need to include the use cases of the system. We're following this template:
ID
Description
Actors
Precondition
Basic Steps
Alternate Steps
Exceptions
Business validations/Rules
Postconditions
In the Basic Steps section, should we include steps that the system p... |
Possible Duplicate:
Functional Programming vs. OOP
How to write manageable code with functional programming?
In OOP, your basic unit of organization for code is the class. A frequently used methodology in Java, C# and similar languages is to organize your code around having one file for each class with the file name... |
Say you have a document with an essay written. You want to parse this essay to only select certain words. Cool.
Is using a regular expression faster than parsing the file line by line and word by word looking for a match? If so, how does it work? How can you go faster than looking at each word?
|
I little bit new to the CodeIgniter framework and this is my first project with this framework. During a chat on StackOverflow somebody said that we need to make controllers tiny as possible.
Currently I have a default controller named home with 1332 lines of codes (and increasing) and a model named Profunction with 13... |
For reference - http://en.wikipedia.org/wiki/Single_responsibility_principle
I have a test scenario where in one module of application is responsible for creating ledger entries. There are three basic tasks which could be carried out -
View existing ledger entries in table format.
Create new ledger entry using create... |
I'm trying to convert a Fortan77 program to C#. I have a subroutine with about 650 lines of code and horrific GOTO statements all over the place. I'm having a lot of trouble even starting to visualise the flow of the subroutine to figure out what it does.
Is there anybody with experience in this sort of thing who could... |
I have some computer science students in a compulsory introductory programming course who see a programming language as a set of magic spells, which must be cast in order to achieve some effect (instead of seeing it as a flexible medium for expressing their idea of solution).
They tend to copy-paste code from previous,... |
What are the consequences of allowing multiple inheritance in a programming language?
What characteristics of multiple inheritance create an environment such that the use of multiple inheritance tends to result in source code that violates one or more principles of Object Oriented Programming and quality software engin... |
Recently I've been working on refactoring parts of the code base I'm currently dealing with - not only to understand it better myself, but also to make it easier for others who are working on the code.
I tend to lean on the side of thinking that self-documenting code is nice. I just think it's cleaner and if the code s... |
This is a minor niggle, but every time I have to code something like this, the repetition bothers me, but I'm not sure that any of the solutions aren't worse.
if(FileExists(file))
{
contents = OpenFile(file); // <-- prevents inclusion in if
if(SomeTest(contents))
{
DoSomething(contents);
}
e... |
I have been happily using JQuery for the last 2 years and have been quite sucessful creating some really cool functionality with it...so I am very comfortable with it. I also beleive the future of the web will continue on the current client-side path.
However...
The next challenge seems to be coming in the form of var... |
I think we've all been there:
You hear of someone say "hey, wouldn't it be nice if platform X had feature Y?" You look around (on SO!), the feature really doesn't exist, even though it probably would be useful in many contexts. So it's pretty generic.
Your mind wanders for a bit. "How tough would it be? Well, it'd prob... |
If asked a series of technical questions in a programming interview, does it look bad to admit when you don't know the answer to a question?
In other words, does admission make you look incompetent or ill prepared? Or, is it assumed that no one will know the answer to every question? Does admitting it instead of tak... |
I'm working on a small educational project on MVC 3, and I'm facing a small problem, when attempting to handle validation in my application through a wizard.
I tried to get benefit from the ability of MVC3 to deliver content of a different view using the same URL, when handling an [HttpPost] method on a page.
I my case... |
I have just completed my Master's degree in Computer Science and have gotten my first job interview as a developer. I do not have much experience in large scale development projects, but I am hoping my university education counts for something.
I am wondering, what materials should I bring that would impress my interv... |
What are the relative merits (or demerits) for implementing an Erlang-style "Continuation" pattern in C#. I'm working on a project that has a large number of Lowest priority threads and I'm wondering if my approach may be all wrong.
It would seem there is a reasonable upper limit to the number of long-running threads ... |
As a C & Objective-C programmer, I'm a bit paranoid with the compiler warning flags.
I usually try to find a complete list of warning flags for the compiler I use, and turn most of them on, unless I have a really good reason not to turn it on.
I personally think this may actually improve coding skills, as well as poten... |
I keep hearing about the desperate recruiting efforts of companies in tech hubs such as SF and NYC. However, every time I'm contacted by a startup I'm told the position is on-site and working remotely isn't possible.
Let me clarify that these are tech startups. They should be very comfortable with the idea of using tec... |
I'm currently new to freelancing as a programmer and need to work out what some of the "norms" are without making myself look like an amateur.
I've already won some work from a local company doing C# development and quoting an hourly rate for work that i am doing from my office.
However on one upcoming project I've bee... |
I am new to jQuery and mobile apps development. I know the features of jQuery Mobile. I want to know where and why to use it. Can I use jQuery Mobile if I am developing a native app?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.