instruction stringlengths 34 36.1k |
|---|
I'll preface this with I don't know if anyone else who's been programming as long as I have actually has this problem, but at the very least, the answer might help someone with less xp.
I just stared at this code for 5 minutes, thinking I was losing my mind that it didn't work:
var usedNames = new HashSet<string>()... |
We are trying to switch to a continuous integration environment but are not sure when to do code reviews. From what I've read of continuous integration, we should be attempting to check in code as often as multiple times a day. I assume, this even means for features that are not yet complete.
So the question is, when... |
My project manager assigned me a task to estimate the development time for an iPad application. Lets assume that I gave estimation of 15 working days. He thought that the number of days where too many and client needed the changes to the application urgently (as in most of cases).
So, he told me: "I am going to assign ... |
Problem is, we have developed a small CMS, that is different per implementation (currently).
Of course development of this is never complete. Sometimes, we are working on more than one project that implements it (by copying-pasting the code files of the CMS to each project), and we add a new feature that we want to sha... |
Reading books, watching videos, and reviewing tutorials is all very easy. Taking notes and actually learning the material may be slightly harder, but even then, anyone with a decent brain and a fair amount of interest, it's easy enough (not to mention, fun).
The thing is, it doesn't really prepare you to write a full p... |
I have a list of objects that need to be processed in some way. That way may not be correct for an item and thus raise an exception. In pseudo-code, it would look like:
proccessItems (list)
error = new empty list
for item in list:
try:
process_item(item)
catch Whatever, err:
error.append(err)
... |
I have 10 developers and 3 Testes team and I want to setup CruiseControle as CI for automated builds, tests and deployment to production server and some repository for SCM ( Source Code Management). I need something that would enable the team lead to create tickets (tasks) for each sprint in SCRUM and issue/bug tracki... |
Recently I came across the question NSString: Why use static over literal? and in the comments arrived a new question.
In Objective-C there some "special" types that are just maps to C primitives. Like the NSInteger.
#if __LP64__ || (TARGET_OS_EMBEDDED && !TARGET_OS_IPHONE) || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64
typ... |
We are on the stage of planning a CakePHP project.
It is a relatively a big project for us, as a developer+project manager, I want to hire someone
to work with me. But what I really want is to spend less time on actual coding, without losing control
of the code quality.
What I want to do is that I will design all the f... |
I'm looking to add push notifications to one of my iOS apps. The app is a client for a website which doesn't offer push notifications.
What I've come up with so far:
App sends a message to home server when transitioning to background, asking the server to start polling the website for the logged in user.
The home ser... |
I'm a physicist with a CS degree and just started my PhD at a tech company (wanted to do applied research). It deals with large scale finite element simulations.
After reviewing their current approach, I think that a radically different method has to be applied (they are using a commercial tool which is very limited). ... |
I'm trying to do some huge AI system just for the fun and I've come to this problem.
How can I let the AI entities know about each other without getting the CPU to perform redundant and costly work? Every entity has a spatial awareness zone and it has to know what's inside when it has to decide what to do.
First thoug... |
Could Java ever match C++ with regards to programming ultra high frequency systems? Has the JVM improved enough to allow this? From a theoretical or practical point is it possible?
Is C++ used in most UHF systems simply because out of habit?
If you agree/disagree, what parts to Java/C++ is the basis for your viewpoint... |
So I've been programming for about 9ish months now, and I've taught myself some Python, some PHP and some Javascript.
I want to become better at these languages - I can hack something out, but a lot of things like OOP, using lists in the most effective ways, etc, is lost on me.
What are the best ways to become an "expe... |
I was just wondering if there were some "standard" examples that everyone uses as a basis for explaining the nature of a problem that requires the use of a buffer. What are some well-known problems in the real world that can see great benefits from using a buffer?
Also, a little background or explanation as to why the ... |
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.