instruction stringlengths 34 19.9k |
|---|
I just came up on xpath recently while writing a greasemonkey script and immediately fell in love. I haven't done any benchmarking yet (coming soon), but according to a couple sources that I read, xpath is faster than using the DOM API. After checking out the internals of a couple of libraries (Swizzle and jQuery), I n... |
Since Python was written in the C programming language, does it mean that if I know C I will learn and master Python faster than it would take me to learn it without prior knowledge of C?
Or will Python coders find it easier to learn C than programmers from other languages not related to C?
|
I've been wanting to try out graphics in Haskell. From what I've seen, the available libraries are either front-ends to C/C++ libraries, or an abstraction of them with minimal features. The high-level libraries do not seem to suit my needs, and so I'm left with lower-level front-ends.
What I need is to render tiles and... |
There are various versions of Eclipse IDE available at Eclipse Download. Since, I am not concerned with Java development, I downloaded the Eclipse Classic 3.7.1. Now, I want my IDE to be setup for Python and PHP development.
1) Have i downloaded the correct version ??
2) What tools should i download next.
NOTE : I hav... |
I have a database of calendar events, that can be administered by the user through a web application.
I would like to offer to the user, functionality for viewing their calendar in any client of their choice (to the extent that open standards are implemented), primarily Outlook and Google calendar.
I would also want fo... |
My current client has several internal products which the IT-department supports. All product owners are non-technical and each application is always developed by one developer (and so is all change requests).
The current methodology is a bit like waterfall. All uses cases are defined first by the product owner. Then t... |
I need a small clarification about StreamInsight, I know by doc's that StreamInsight can handle multiple concurrent Events. But will the event producer be a separate function, for ex: I need to watch a folder for new Files because all my sensors will write readings every day in a new file in particular drive.
Method 1:... |
I am reading Effective Java and it has the following sentence.
The disadvantages of wrapper classes are few. One caveat is that wrapper
classes are not suited for use in callback frameworks, wherein objects pass selfreferences
to other objects for subsequent invocations (“callbacks”).
Now what is a callback frame... |
The system we are developing, using .NET, is extremely large, complex, and some modules are poorly written. We have a large user acceptance test team that is aiming for 100% business scenario coverage, which takes about 6 weeks.
Can we use behavior driven development to replace some of the manual tests being done by th... |
I am currently on a paid internship, and have been tasked with maintaining an obsolete system that has been developed by multiple developers (at different times) over the course of the past 5 years. Management agrees the "system is on life support", and I receive a fairly regular supply of bug reports from end users cu... |
Are there any guidelines for deciding when a class should be in its own assembly/DLL? I often see two schools of thought:
1) Every "grouping" of classes belongs in its own DLL e.g. Repositories, Services, DTOs, Infrastructure, etc.
2) Everything should be in a single DLL but separated out via namespaces/folders e.g. h... |
We have developed a WCF service which acts as an API to our system.
some of the methods expose functionality which eventually writes and updates data to DB.
Lets say that the client sent one of those requests, the service performed the needed operations while the client disconnects for some reason and did not get the r... |
The answers to this question might be different than the generic, "I graduated. Duh, now what should I do?" Living in an area with a low population presents limited opportunities compared to those in more urban or suburban communities. On the other hand...maybe the answers will be largely the same. I'm asking you f... |
I am working on a library which had several headers that are meant to only be used by the library itself. I also have a few classes and functions in headers that I do not want the client to use. For instance, I have a header that contains debugging functions, but they should not be used outside of the library as it cou... |
I think most people would agree that pointers are a major source of bugs in C programs (if not the greatest source of bugs). Other languages drop pointers entirely for this reason. When working in C, then, would it be best to avoid using pointers whenever practicable? For example, I recently wrote a function like this:... |
When creating a web service API, how much should I count on the developer to act by my rules?
We are really aimed on creating an API so the developers shouldn't develop client side logic too much...
for example, if in one of my methods we require the client to send us a unique ID - we are relying on the client that the... |
A common pattern I see is what's known as the Mapper pattern (not to be confused with DataMapper which is something else entirely), which takes as an argument some kind of "raw" data source (e.g. an ADO.NET DataReader or DataSet) and maps the fields to properties on a business/domain object. Example:
class PersonMappe... |
If an estimate is not a promise then as a product owner how can I deliver my projects without knowing how long it will take?
Does a Scrum team work more efficiently if we treat time estimates as a promise?
How much research (preparation, effort to understand the problem) in a story is enough to come up the right estima... |
I am creating a RESTful JSON API to access data from our website where the content is in German.
A handful of the fields will return formatted HTML while most are single lines of text although they are highly like to include special characters.
To make it easy to use I wanted consistency throughout. As the text in the ... |
I am a member of some online coding website and today when I submitted a solution in C++, I saw there were much better answers in C++ itself which took considerably less time. The solutions were open so I went on through some of them and found all of them using map datastructure. I could not figure out where exactly i... |
What are combinators?
I'm looking for:
a practical explanation
examples of how they are used
examples of how combinators improve the quality/generality of code
I'm not looking for:
explanations of combinators that don't help me get work done (such as the Y-combinator)
|
I'm creating a dynamic popup menu whose contents depends on the state of what the user clicked on. Is it considered a better practice to create a template menu in html and modify which options are displayed in javascript, or to create everything in javascript on the fly? I'm using jQuery.
code example:
HTML:
<div id="m... |
I am very new to Visual Studio and C# and am wondering how best to create a repository of sorts for utility methods.
For instance, we need a method that returns the current fiscal year and other company specific values.
Would it be best to create utility class file that is imported into every project? Or, create a new ... |
Not looking for any code snippets here, so here goes:
Let's say 100,000 users on my web app have authorized my application to connect to facebook (with or without offline_access). I want to build a sort of "pull" mechanism, whereby when a user posts to their facebook wall, I can grab it from the Graph API and store it ... |
I don't know if this is too broad or not, but I am a youngish programmer still in college, its my Junior year. I feel like I have a pretty good grasps for different languages and have a pretty good base. But I am stumbling to think how if for example, I am trying to create a program and say I wrote one part in python j... |
I am contributing to a library that is licensed under the MIT license.
In the license and in each class file it has a comment at the top saying:
Copyright (c) 2011 Joe Bloggs <joe.bloggs@example.com>
I assume that he owns the copyright to the file, and can change the license of that file as he sees fit.
If I contrib... |
This is mostly a hypothetical question, but it's something I've been tossing around and I wondered what other people though. Here's a contrived example to illustrate: Let's say I'm building an app that lets users pick a few keywords and then shows them photos that are tagged with those keywords.
On one hand, I could c... |
Are there any studies on the relationship between software testing practices (unit and/or integration tests) and developer productivity?
|
I've taught myself always to handle any data access code in a completely separate 'layer' to my business logic and UI code. This has always been a very good architecture for me and any 'rules' or best practices I see, still manage to fit into this style of coding, especially Single Responsibility Principle.
For most of... |
I just read the question what are callback frameworks?, where the asker cites the following from Effective Java:
The disadvantages of wrapper classes are few. One caveat is that
wrapper classes are not suited for use in callback frameworks, wherein
objects pass selfreferences to other objects for subsequent
invo... |
For example, if the code generates a random int from 0-10, and takes a different branch on each outcome, how can one design a test suite to guarantee 100% statement coverage in such code?
In Java, the code might be something like:
int i = new Random().nextInt(10);
switch(i)
{
//11 case statements
}
|
I had been programming for many years but wanted a diploma to make myself more employable. Having already been through university once, I didn't choose a full 5 year computer science major but a shorter, more practically-oriented software engineering program.
I expected that it might focus more on concrete skills than ... |
In the movie theatre I go to they have ticket kiosks that allow you to select the seats you want; they also have a website that does the same (the website also has a countdown timer of like 30 secs in which you must choose a seat).
While I understand things such as database transactions and other techniques for handli... |
We are in the middle of a strange situation. We and a partner firm have to put up a web portal. They have a lot of functionality already done on their other portal and we are the managing firm on the project. But there are also some new development needed on their side which is designed by us. Strange thing is, we are ... |
I have some instruments. Each instrument should have a name (string) and description (string).
Each instrument can have some setups, which these setups are each a series of commands(string[] or List).
I want this class to be flexible so I can easily add or remove a whole instrument, or add or remove setups for any ins... |
I have created a desktop application(winfoms) using C#.net 3.5, the application is an SEO application, so it has to be connected to the internet, i implemented a simple licensing routine where every time the application is started it will query the web service on my server with the key and machine hash to validate.
But... |
I would probably consider it a code smell or even an anti-pattern to have a class that implements 23 interfaces. If it is indeed an anti-pattern, what would you call it? Or is it simply just not following the Single responsibility principle?
|
I do freelance web projects for a client. The client has been asking me to buy an iPad for testing purposes. Should I ask him to get me an iPad ?
I otherwise don't have any need for the iPad. Is it ethical to ask for sponsorship when you are getting paid for the projects ? Should I try it out ?
|
When did these design patterns originate? Balking, Builder, Delegation, Facade, Memento. I have looked for days across the net, so if someone points me to a simple google search I may shoot myself. The real question I have is only which is the oldest and which is the youngest, so the specific dates for each are not imp... |
In various languages (Java at least, think also C#?) you can do things like
if( condition )
singleStatement;
while( condition )
singleStatement;
for( var; condition; increment )
singleStatement;
So when I have just one statement, I don't need to add a new scope with { }. Why can't I do this with try-catc... |
I need some advice to take the steps for TDD. How do we think in terms of interfaces for everything when we are writing code? Most of the testing books tell you how to write tests. But I want a book which tells whats the good way to write code in terms of TDD
|
I have a possible C# dev job lined up but before I can interview, I need to pass a test with the employment agency.
Now even though I am a senior developer with over 10 years of programming experience and more than 3 of these years with c#, I am really not looking forward to this test and I think there is a good chanc... |
I've been using Devise for a little while, and I've realized it's built on something else called Warden that handles authentication. What does Devise offer me outside of Warden, because I was considering removing devise and just using Warden.
|
First the history:
I found out DateTime data types cannot be null (Yes they can be nullable using the ? nullable declaration).
I was told this is because they are value types and placed on the stack (not on the heap).
I can understand why the stack is quicker and why value types need to (mostly) be placed on the stac... |
I'd admire the functions of sympy library, what it does is really awesome. The integration functions are really few guys intellectual work. But where exactly we use them practically on computers? If not sympy, do we really need such libraries? If we need them, what languages would satisfy our needs?
|
I've agreed to build an iPhone app for a client that was referred to me. I'm a full-time software engineer by day, but this is only my 2nd iPhone app and I agreed to do it without upfront funding as it would give me a project to further learn the API as well as increase my portfolio of iPhone apps.
The client suggested... |
The Actor concurrency model is clearly gaining favor. Is there a good book that presents the patterns and pitfalls of the model? I am thinking about something that would discuss, for instance, the problems of consistency and correctness in the context of hundreds or thousands of independent Actors.
It would be okay if ... |
I am a computer science student, and as a result, I was taught C++ as a better version of C with classes. I end up trying to reinvent the wheel whenever a solution to a complex problem is needed, only to find sometime after that, some language feature or some standard library routine could potentially have done that fo... |
I am currently interested in job prospects outside of my own area of programming. Specifically, I'm a web developer but want to make the transition to desktop application programming. How should I tailor my resume to show that I am capable of this type of software development when I have had no prior experience with it... |
Assume we have two projects and one or more teams (one team doing the projects in serial or two teams doing the projects in parallel).
If Team A decides that a task is 8 story points and Team B decides that a task on their project is also 8 story points, does that say anything about the relationship between the two ta... |
I'm interested in how browser layout engines like gecko, webkit and trident are architected from a high level. what are the key abstractions? how are they layered? what are the inputs/outputs for the different abstractions? Is there a diagram or article that explains this particularly well?
I am sure the implementation... |
If one views the CLR/.NET runtime and associated libraries as the future of windows, then the F# programming language could be seen in that light as the most native functional language. Meaning that it has support from the OS creator, presumably integrates best with their libraries, etc.
Is there a similar logical cho... |
So I have a couple of software/site in my portfolio. They make money but not a whole lot.
So I decided to get some job experience, mainly applying to Java/PHP junior development positions.
The problem is that I answer all the technical questions correctly and we schedule to do a coding "test", the final phase of the in... |
Currently working on a complete front-end and back-end overhaul of our webapp. We did this because a lot of changes needed to be made to the database schema as well as the user experience.
Now we are almost done with the overhaul and I'm thinking if we could have taken a more incremental approach? We started a new code... |
In my team, people have tendency to develop a POC (which is very close to actual deliverable in terms of features) which takes good amount of time to be created. And then spend a significant time to refactor the POC so that it matches the design principles using all required design patterns, sometimes naming etc...
On... |
The guy who is in charge of our html emails is leaving and I have been asked to take over. We are an online retailer and send out an email once a week. An email will consist of a main image, a bit of an opening paragraph and then rows of product offers.
As everyone knows html emails are painful to work with due to the ... |
In the section When to Use Exception in The Pragmatic Programmer, the book writes that instead of:
retcode = OK;
if (socket.read(name) != OK) {
retcode = BAD_READ;
}
else {
processName(name);
if (socket.read(address) != OK) {
retcode = BAD_READ;
}
else {
pro... |
Let me demonstrate a simple example,
Class Organization
ID type Number,
Name type String,
HAS A -> Collection
Class Facility
ID type Number,
Name type String,
Location String ,
HAS A -> Organization
I am demonstrating a simple circular reference between two objects of an anemic data model. Assuming they are... |
I want to write an application that can be used to burn CDs (music). I know I should test it with real CDs anyway, but I don't want to do this every time I make a small change. But I do want to know and test if the right data will be burnt, so you don't get corrupted CDs.
I am using a library which only exposes APIs to... |
I am working on a PHP script that I plan to sell without giving the user the ability to distribute it to anyone else.
I have heard about GPL being viral and I have quite a few libraries that are being used in my script that are under the GPL. (for example : jquery, phpthumb etc)
Does this mean that if a user who has bo... |
I'm developing a web application which I started on about 2 years ago. It is an AJAX-heavy single page design and prototype solved problems where I didn't want to reinvent the wheel. I am using a couple of third-party tools that depends on prototype, namely okonet modalbox, protofish tooltips, scriptaculous, My own use... |
I have to design a database wherein I have to associate an audio_id with multiple tags(words). I am considering following approaches to select one from these:
1) To have multiple fields for multiple tags (columns: tag1, tag2, tag3.... tag10) corresponding to a single audio_id. The number of tags in my application will ... |
I have an architectural question about a project that I am working on.
Currently it is a simple .NET C# application that runs on several client machines, and communicates with a central MySQL server for data storage. There is not an application or service on the server at this time, just MySQL.
I would like to add imag... |
I am new to developing Chrome extensions and I used Stack Overflow to ask many questions and got great answers. I finally finished a beta version and uploaded it to Chrome store only for test users. Now I am not sure where to find test users so I decided to ask here. Is there a separate forum where people post their ap... |
Among other things, .NET's Reactive Extensions simplify concurrency management.
From what I've heard, .NET 4.5 will simplify concurrency management with things like the await keyword.
My Question:
Will .NET 4.5 make the Reactive Extensions obsolete?
Or is Microsoft expected to pitch the .NET 4.5 additions as an altern... |
For the bugs or issues, there are now many good issues trackers available which allows status and tracking issues and also allows you to organize it to manage specific releases.
I am looking for test case tools should be able to support listing of functionality and test cases with possible linkage to them, allows test... |
When QAs write automated selenium tests to test a multi-layered website (e.g. testing a web app which is on mvs design, spring and database) should the tests make use of existing classes and frameworks written by developers or should we write simplified classes to serve the test?
The downside of relying of frameworks d... |
I have built a few browser extensions that live in GMail. Since they are larger extensions, they incorporate jQuery 1.6.x.
I am using jQuery as a content script which means it is injected into GMail then my scripts reference jQuery as they are loaded afterwards.
I have found that when other extensions are installed al... |
Subversion Re-education actually convinced me, but for now I'll stick to svn - mastering the use of a very popular tool can't be bad.
To date I've not used branching/merges in production code, now I decided to give it a try in a small team environment.
I'm afraid of suffering the same pain as the described in Spolsky's... |
A lot of scripting languages like Perl, Awk, Bash, PHP, etc. use a $ sign before identifier names. I've tried to look up why but never had a satisfactory answer.
|
I work for a company where we build enterprise applications, and we maintain three environments: development (or dev), staging (or stage) and production (or prod).
The meaning of dev is intuitive: it's the environment used during development of the application.
What's the difference between staging and production envir... |
I write enterprise Java applications and web services at work (Spring, Hibernate, Maven, RESTEasy) and PHP (CakePHP) and Python (Django) for my side projects.
While I do see the value that Inversion of Control, Aspect Oriented Programming etc. that Spring brings in, I am not sure how massive web applications that are n... |
A co-worker and myself have run into an issue that we have multiple opinions on.
Currently we have a git repository that we are keeping all of our cronjobs in. There are about 20 crons and they are not really related except for the fact that they are all small python scripts and essential for some activity. We are us... |
On the matter of Recursion:
When you create a recursive function, you create a call stack. Ok, no problem; However, a comment on this page (look for comments by "LKM") triggered my curiosity (and google was no help):
What is a local stack?
Why would it be faster than a call stack?
How would you actually implement it (... |
I'm a java dev that is new to powershell. I know that it's built on the .Net Framework, but I don't have much knowledge with that framework.
Is there a reference guide of some sort that shows what libraries are available in Powershell? I found a list of Powershell 2.0 commands, but I'm pretty lost as to what library... |
I would really like to understand how an operating system works behind the scenes. However, I think that the kernel of most open-source OSs out there are too complex for learning purposes, even for a full-time programmer to learn. Are there any "simple" OSs made for learning purposes only out there?
|
If we refer to exceptions as bugs, why not just call it a bug in the first place instead of an exception?
If in the code it's called exception and as soon as it occurs it's called a bug. Then why not call it a bug in the first place?
Thank you for any answer or comment.
|
I recently forked a Git repository, and locally I created a project in my IDE to compile with.
My IDE creates a variety of artifacts that I would like to keep saved somewhere. The obvious place would be in the VCS. If I add these files then they will be in the history for my fork. If i want send a pull request to merge... |
I am a huge linux fan and have been ignoring .net, C#, and visual basic due to their relationship with Microsoft. Am I foredooming them just for their relationship?
Is there any advantage to learning them, when you are mainly a linux user?
|
I'm considering using appledoc, a flavor of Doxygen for use in generating Objective-C code documentation, in order to create documentation for my company's iOS apps. The idea is that a server will generate the docs on a post-commit hook, then publish the documentation on an internal network.
Right now we have very litt... |
I am wondering if there are any benefits / risks of (not) putting a licence on test code which mostly consists of unit tests. What do you think?
I am particularly interested in licensing under (L)GPL, Apache, MIT and BSD.
EDIT: The assumption is that non-test code is already published under some licence, but test code ... |
Feeling slightly witty the other day, I wrote an eachWithIndex: method in a NSArray category. It has a typedef like this:
typedef void (^processItem)(id item, int index);
and the method looks like this:
- (void)eachWithIndex:(processItem)block {
for (int i=0; i<self.count; i++) {
id item = [self objectAtIn... |
I have responsibility for a large Asp.Net based website. It is currently a website (not web application), some windows services and a number of class libraries.
The data layer uses a mixture of LLBLGEN and Linq To LLBGen, as well as a number of instances of legacy inline SQL which have not been refactored.
There are s... |
During the course of writing the code guidelines for a company I found myself recommending using the Builder pattern from Effective Java, instead of telescopic constructors.
However, after thinking about it a bit more, surely a more elegant solution is to just remove the builder class and the also remove the extra cons... |
Some of my friends say that UNIX is beautiful and simple. But I really don't know what they mean. Why are they saying so? For me, UNIX is just a boring command prompt with different shells. How can I experience the beauty of UNIX? Can you share any experience?
|
My company is going to hire an external developer to write some simple PHP modules and some minor bugfixing in our software.
We have never hired an external developer by the hour before. How can we measure external developer's productivity and coordinate with them?
I thought about using a combination of http://worksna... |
As server-side generated HTML is trivial (and it was the only way to make dynamic webpages before AJAX), server-side generated CSS is not. Actually, I've never seen it. There are CSS compilers, but they generate CSS files which can be used as static.
Technically, it requires no special libraries, the HTML style tag sho... |
Is it possible to develop one application that can be be run in both: metro and classic style in Windows 8? I mean, application with the same core and two separate UIs, adjusted to currently used mode.
|
Currently, I'm very comfortable with building tools/web apps in an ASP.NET environment. I'm not really looking to leave tbh, as I really like C#, ASP.NET, MVC 3, Visual Studio, etc.
However, right now I know almost nothing about PHP and that seems like a deficiency that I'd like to rectify.
Are there any books (or othe... |
Possible Duplicate:
Are design patterns really essential nowadays?
Is it necessary have a knowledge and understanding of design patterns for someone to be a professional programmer? Why?
|
I am designing a game server which would be used for Android terminals. I've been searching for products or frameworks to use for two-way socket communication but haven't found anything worth mentioning.
Simply, I want to implement the architecture below:
In other words, one TCP connection from the client to the serve... |
I have 30+ sources of data I scrape daily in various formats (xml, html, csv). Over the last three years Ive built 20 or so c# console applications that go out, download the data and re-format it into a database. But Im curious what other people are doing for this type of task. Are people building one tool that has a l... |
I have some previous posts talking about how to use python to "do something" when a record is inserted or deleted into a postgres database. I finally decided on going with a message queue to handle the "jobs"(beanstalkd). I have everything setup and running with another python process that watches the queue and "does s... |
Possible Duplicate:
Etymology of “String”
I was talking to my non-technical wife about my workday and she was confused as to why I was talking about strings. In her mind, a string is a piece of yarn or thread (I didn't tell her what I thought a thread was).
So it got me wondering...why do we use the vernacular "Str... |
Our development team is pretty new to the scrum process, so I would like to help refine our methods to make better use of it. In particular, I noticed that the correlation between story points and task hours is not very good. That is, we often have stories of lesser points decomposed into a total task hours greater tha... |
I have detailed information on the latest developments in functional programming.
I think haskell is quite an advanced and high level programming language. With coq and agda this gets even more complex and advanced.
With "advanced" and "high level" I mean many distinct features, that can only be found in the respective... |
My employer asked me to implement a feature that would require storing passwords in clear text in a database (or using an obscure encrypt/decrypt function stored in a binary, which is a bit better, but also insecure).
I replied that I was willing to implement such a feature, provided that customers were acknowledged of... |
I've always wondered how many different exception classes I should implement and throw for various pieces of my software. My particular development is usually C++/C#/Java related, but I believe this is a question for all languages.
I want to understand what is a good number of different exceptions to throw, and what th... |
I know very well that java is a portable language..and it is the byte-code that makes it portable..
However I've studied also that C is a portable language.
"The programs written in C are portable i.e. programs written for one type of computer or operating system can be run on another type of computer or operating syst... |
To the extent that I understand the Single Responsibility Principle, a SINGLE class must only have one responsibility.
We use this so that we can reuse other functionalities in other classes and not affect the whole class.
My question is: what if the entity has only one purpose that really interacts with the system, an... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.