instruction stringlengths 34 19.9k |
|---|
I'm learning C# by programming a real monstrosity of an application for personal use. Part of my application uses several SPARQL queries like so:
const string ArtistByRdfsLabel = @"
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?artist
WHE... |
I've created a few open-source projects in the past, and had some success. The process was generally the following: I'd start alone, create something that works, promote it, and finally (maybe) get some contributions.
I have less that to contribute to open-source now, but I still have ideas and can still code :) So I w... |
Code Review.SE is great when you need feedback on a precise, short piece of code.
But where to get similar feedback about the code itself when:
you have thousands of LOC,
don't have colleagues in your workplace ready or willing to review the code¹,
don't have thousands of dollars to spend for a professional review by ... |
There is an interesting interview with Werner Vogels which is partly about how Amazon does Service Oriented Architecture:
For us service orientation means encapsulating the data with the
business logic that operates on the data, with the only access through
a published service interface. No direct database access... |
I'm building an ajax heavy application (client-side strictly html/css/js) which will be getting all the data and using server business logic via webservices.
I know REST seems to be the hot topic but I can't find any good arguments. The main argument seems to be its "light-weight".
My impression so far is that wsdl/so... |
This is a pretty generic question but one I've been wondering about for a while: is there a standardized, generally accepted, or even just systematic way that people write code as a group?
For example, in a project written in C++, does one developer write one class, which he passes off to the next developer with a quic... |
I have not worked with any caching mechanisms and was wondering what my options are in the .net world for the following scenario.
We basically have a a REST Service where the user passes an ID of a Category (think folder) and this category may have lots of sub categories and each of the sub categories could have 1000 o... |
I'm basing my Git repo on A successful Git branching model and was wondering what happens if you have this situation:
Say I'm developing on two feature branches A and B, and B requires code from A. The X node introduces an error in feature A which affects branch B, but this is not detected at node Y where feature A an... |
We have a SOA-based system. The service methods are like:
UpdateEntity(Entity entity)
For small entities, it's all fine. However, when entities get bigger and bigger, to update one property we should follow this pattern in UI:
Get parameters from UI (user)
Create an instance of the Entity, using those parameters
Get... |
We are crawling and downloading lots of companies' PDFs and trying to pick out the ones that are Annual Reports. Such reports can be downloaded from most companies' investor-relations pages.
The PDFs are scanned and the database is populated with, among other things, the:
Title
Contents (full text)
Page count
Word cou... |
I'm trying to determine what my legal obligations are if I use an MIT-licensed library (JAR file) in my program. Do I need to include the library's source code when I distribute my program? Do I need to include a README explaining the licensing of the packaged JAR? If I'm simply including the unedited JAR file, do I ev... |
I learned to program in C many years ago, and used C steadily for about 10 years.
These days, I occasionally have to look at C code, because our Informix 4GL RDS customized runners also contain C code, but it is fairly simplistic code.
When I was using C a lot, I never remember hearing about of flexible arrays. I am a... |
I've a huge classic ASP application where in thousands of users manage their company/business data. Currently this is not multi-user so that application users can create users and authorize them to access certain areas in the system.
I'm thinking of writing a handler which will act as middle man between client and serv... |
I'm trying to working how to handle authentication when I have iOS clients accessing a Node.js server and want to use services such as Google, Facebook etc to provide basic authentication for my application. My current idea of a typical flow is this:
User taps a Facebook/Google button which triggers the OAuth(2) dialo... |
All the programmers in my team are familiar with unit testing and integration testing. We have all worked with it. We have all written tests with it. Some of us even have felt an improved sense of trust in his/her own code.
However, for some reason, writing unit/integration tests has not become a reflex for any of the... |
I like the fact that the C language lets you use binary arithmetic in an explicit way in your code, sometimes the use of the binary arithmetic can also give you a little edge in terms of performance; but since I started studying C++ i can't really tell how much i have seen the explicit use of something like that in a C... |
I have just moved from Linux to Windows, and I have to use the Zend Framework library. Where should the library be placed?
Directly on C drive
Create a lib folder like C:/lib/
Create a lib folder in my user folder
I am wondering if there is a classic folder where these kind of libraries are placed.
Update:I am askin... |
In our project, an assembly combines logic for the IoC-Container, the project internals and the communication layer.
The current version evolved to have only internal classes in addin assemblies.
My main problem with this approach is, that the entry point is only available over the IoC-Container. It is not possible to ... |
We are developing the agile way for a few months now and I have some troubles understanding the agile manifesto as interpreted by my colleagues. The project we are developing is a framework for future projects and will be reused many times in the next years.
Code is only written to fulfill the needs of the current user... |
I know the company you work for owns the code and obviously you will get arrested if you try to sell it. But is it uncommon for developers to keep a personal copy of the code they wrote (for future reference)?
Apparently this guy was sent to prison for copying source code.
|
I have a question related to mobile compatible websites, I have seen two type of websites
One in which they adopt traditional website look and adjust website according to mobile screen, if they have lot of information which can not be adjust according to screen then they expand the height of page, so that user can scr... |
I am an undergraduate student and I have to create a Semantic Network based on Wikipedia. This Semantic Network would be similar to Wordnet(except for it is based on Wikipedia and is concerned with "streams of text/topics" rather than simple words etc.) and I am thinking of using the Wikipedia XML dumps for the purpose... |
I'm writing an app that will make available a set of api functions that require cross site scripting to work. I'll be utilizing jsonp which will allow other developers to consume these services for their web applications.
What security concerns should I consider to protect my server data?
What security concerns sho... |
Typically in C# I use dependency injection to help with mocking;
public void UserService
{
public UserService(IUserQuery userQuery, IUserCommunicator userCommunicator, IUserValidator userValidator)
{
UserQuery = userQuery;
UserValidator = userValidator;
UserCommunicator = userCommunicator;
}
...
... |
Lately I've been getting professional work, hanging out with other programmers, and making friends in the industry. The only thing is I'm 100% self-taught. It's caused my style to extremely deviate from the style of those that are properly trained. It's the techniques and organization of my code that's different.
It's... |
I'm like doing TDD so I started everything mocking objects, creating interface, stubbing, great.
The design seems to work, now I'll implement the stuff, a lot of the code used in the stubs are going to be reused in my real implementation yay!
Now should I duplicate the tests to use the real object implementation (but ... |
I just came across the Caliper project and it looks very nice.
Reading the introduction to microbenchmarks, one gets the feeling that the developers would not suggest to use the framework if the benchmark takes longer than a second or so. I looked at the code and it looks like a RuntimeOutOfRangeException is actually t... |
I am working on a C++ project that is getting bigger and bigger. I do a lot of UML so it was not really hard to explain my work to co-workers until now. Lately I implemented a lot of new features and I gave up updating by hand my Dia UML diagrams. My code is documented with Doxygen but the generated doc is not really v... |
I am very new to IT industry and have no prior experience. However I came into contact with a party who is gear to build a mobile application. But, they want me to sign NDA (No Disclosure Agreement).
The definition seems vague,
The following definitions apply in this Agreement: Confidential
Information means informa... |
I am working with developers right now that write code the way they want and when i tell them to do it other way they respond that its just matter of preference how to do it and they have their way and i have mine.
I am not talking about the formatting of code, but rather of way site is organized in classes and the way... |
I'm still a student in high school (entering 10th grade), and I have yet to take an actual computer course in school. Everything I've done so far is through books. Those books have taught me concepts such as inheritance, but how does splitting a program into multiple classes help? The books never told me.
I'm asking th... |
I'm one of the developers of Ruby (CRuby). We are working on Ruby 2.0 release (planned to release 2012/Feb).
Python has "PEP302: New Import Hooks" (2003):
This PEP proposes to add a new set of import hooks that offer better customization of the Python import mechanism. Contrary to the current import hook, a new-style ... |
What is the best way to track defect sources in tfs?
We have various teams for a project like the vulnerability team, the customer, pre-sales, etc. We give a build and these teams independently test it. They do not have access to our tfs system. So they usually send in their defects via email. It will usually be send i... |
The web application I work on has been live for a year now, but it's time for it to evolve and one of the ways in which it is evolving is into a multi-brand application - in this case several different companies using the application, different templates/content and some slight business logic changes between them.
Th... |
Is it possible to change the used sequence in Planning Poker, for some stories, it is thought that when the stories gets larger it contains more uncertainty but stories have nearly exact time estimations and these estimations don't drop into two bounds defined by Fibonacci series.
|
I work at a place where we buy a lot of IT projects. We are currently producing a standard for systems-requirements for the requisition of future projects. In that process, we are discussing whether or not we can demand automated unit testing from our suppliers.
I firmly believe that proper automated unit-testing is t... |
I am developing a software project in Java/Swing licensed under GPL v3.
Later, I want to create a Android application which uses the algorithms of the Java/Swing application. This Android app will be a commercial product (sold on Google Play Store).
Is this a problem, when I use my OWN GPL code in a commercial SW devel... |
I am creating some Web Services that would have 2000 concurrent users. The services are offered for free and are hence expected to get a large user base. In the future it may be required to scale up to 50,000 users.
There are already a few other questions that address the issue like -
https://stackoverflow.com/questio... |
I am probably not the only one that feel that way. But I have what I tend to call "The syndrome of the perfect programmer" which many might say is the same as being perfectionist but in this case it's in the domain of programming. However, the domain of programming is a bit problematic for such a syndrome.
Have you ev... |
I understand the concept that a Scrum Master should remove impediments. However I'd like to know where exactly the line should be drawn. For example a team member might have an impediment whereby they need to get support to log onto a live server and get some details. They can't progress a bit of work until this is don... |
I'm working on a rails application, and so far I've focused on the api and the functionality. But now I'm more and more reaching a point where I will want to add static content, descriptions of the software and help information. Information that is generally in a CMS system.
How do I in the best way structure this so I... |
I work for a small software company (about 200 people building 8-10 applications) and I was hoping to get some advice on products that might be out there to manage the information of which clients are using which versions of our products?
The most fundamental relationship would be that a "product" has "versions" and a ... |
I have an abstract class which has all abstract methods except one which constructs objects of the subclasses. Now my mentor asked me to move this abstract class to an interface.
Having an interface is no problem except with the method used to construct subclass objects. Where should this method go now?
Also, I read so... |
I have an application that, among other things, imports documents, then emails necessary parties to let them know that a document has been imported.
It turns out that determining whom to email, then performing the emailing, is what's taking the longest. I was thinking of doing something like this:
var document = Impor... |
My project is currently suffering from environment naming issues. Different people have different assumptions as to what environments should be named or what the names designate, and it's causing confusion when discussing them. I've done a bit of research and I haven't found any standards out there.
The terms include ... |
I am not sure if this is the best subsite to ask this question, but I'm pretty sure it doesn't fit on the normal or facebook SO page...
I've been asked to make a general API for connecting to several Social Media platforms (at the moment Facebook and Twitter).
I have already realised both of them seperately. Meaning I... |
I'm about to create a do-everything dashboard for my team and am still having second thoughts about my project/solution structure. Since this could be a long ongoing project, I want to get the structure right from the beginning.
This is what I had in mind:
Create a solution named "doEverythingDashboard"
Delete the... |
I work as a business analyst and I currently oversee much of the development efforts of an internal project. I'm responsible for the requirements, specs, and overall testing. I work closely with the developers (onshore and offshore).
The offshore team produces all of the reports. Version 1.0 had a 9 month developmen... |
I'd prefer to have sprints that last 3-4 weeks, but customers don't want to adopt new feature/function every 3-4 weeks. Existing customers are conservative and, once we meet their minimum bar for features and capabilities, they like to remain on a
stable release for much longer than 4 weeks. Even a 3-month cycle wou... |
I have started lately discovering Content Management Systems, and I was wondering, who is really CMS for?
What I mean by that: is it only for companies, small businesses or individuals, that pays a contractor to make a website that it's users can just upload content through a easy interface.
Or is it used also by pro... |
I am in an enterprise environment where we have applications that need to run against multiple Oracle databases. Developers may need to manage multiple vintages of these databases to support different test data or diagnose bugs against different versions of the code.
Right now, we have a limited set of test environmen... |
I think the two main problems with my programs are my code structure/organization and my error handling. I'm reading Code Complete 2, but I need something to read for working with potential problems.
For example, on a website, if something can only happen if the user tampers with data via javascript, do you write for t... |
Recently, I had to create a program to send messages between two winforms executable. I used a tool with simple built-in functionalities to prevent having to figure out all the ins and outs of this vast quantity of protocols that exist.
But now, I'm ready to learn more about the internals difference between each of the... |
I have the following :
public class doCheck(){
public void performCheck(){
try {
perform all checks......
}
catch(Exception e){
logger.error("Exception occured in class doCheck in method performCheck");
thrown new MyNewException(e.getMessage());
... |
I have been using Castle Monorail for some years now with great success, although I haven't bothered to update the version I'm using (2 or 3 year old). Now I'm making a decision on go to ASP.Net MVC 3 or update to the latest Castle version.
I have been looking documentation on the newest version of Castle projects (spe... |
Yesterday I had received a great job opportunity.
In requirements section I had seen the words:
solid knowledge of python;
solid knowledge of java;
good technical background;
Could you give me an answer, what does it mean?
How to test my current knowledge? What type of measure will be actually accepted by employer?
|
When writing unit tests, is it worth spending the extra time to make the code have good quality and readability?
When writing tests I often break the Law of Demeter, for faster writing and to avoid using so many variables. Technically, unit tests are not reused directly - they are strictly bound to the code so I do not... |
Based on what's considered idiomatic in C++11:
should an iterator into a custom container survive the container itself being destroyed?
should it be possible to detect when an iterator becomes invalidated?
are the above conditional on "debug builds" in practice?
Details: I've recently been brushing up on my C++ and l... |
I have been working on PHP and MySQL based web application for more than 5 years now. I started my career as an Intern, and worked my way up through Jr Developer and Software Developer to Sr. Software Engineer (Team Lead), and that's what I am nowadays.
I was looking at the link at Wikipedia regarding who is a lead pro... |
I have a custom made Framework (written in PHP). It all works very good, but i have some doubts about a certain thing.
Right now when a user call this url for example:
http://host.com/user/edit/12
Which would resolve to:
user = userController
edit = editAction() in userController
12 = treated as a param
But suppose ... |
I am developing a free, open-source (duh) JavaScript library, and wondering how to license it.
I was considering the GNU GPL, but I heard that I must distribute the license with the software, and I'm not sure anymore.
I would like the library to be available much like jQuery: In a free, downloadable script, preferably ... |
We're using Scrum and occasionally find that we can't quite finish a User Story in the sprint in which it was planned. In true Scrum style, we ship the software anyway and consider including the User Story in the next sprint during the next Sprint Planning session. Given that the User Story we are carrying over is part... |
I'm trying to compare two graphs using hash value ( i.e, at the time of comparison, try to avoid traversing the graph )
Is there a way to make a function such that the hash values compared can also lead to determining at which height the graphs differ?
The comparisons between two graphs are to be made by comparing chi... |
I'm designing a scene graph system, where it is required to compare two trees. The trees are populated with individual objects, each with varied number of children; and they have a root.
Eg: Parent: Scene, Children: Bullet1, Bullet 2, Player
What is a good way to compare two such tree? I'm using C++ for the code.
Als... |
I am a new developer, who just got hired at a big company. I don't know how but I guess they are desperate. However, I am well-versed with HTML5/CSS3 though things change and new things are released and I keep up with as much as I can. But this job required me to hand-code Javascript, know Jquery and Ajax. I have b... |
I need to try the following thing: I would like to compile some simple C code samples and see the assembly listing generated by GCC for IA64 architecture, i.e. I just want to run GCC with the -S switch and see the resultant .s file. I don't have an Itanium machine, so in order to do it myself I'll probably need a cross... |
Possible Duplicate:
Should I use switch statements or long if…else chains?
I'm working on a small program that will conduct an Insertion Sort. A number will be inputted through the keyboard and stored in a variable I called "num." I've decided to use a switch statement in order to obtain the number inputted.
switch(... |
Assuming no experience with version control systems, just local to live web development. I've been dropped in on a few legacy website projects, and want an easier and more robust way to be able to quickly push and revert changes en masse. I'm currently the only developer on these projects, but more may be added in the ... |
I have to handle data from long term (years, decades) climate monitoring stations. The data flow usually starts with raw data (voltages, etc.) plus quality check information (pressure, temperature, flow rate, etc.) generally recorded @ 1Hz. Then, the data are assigned a quality flag (human and/or program), processed (a... |
I am trying to come up with a list / ranking system on determining which server language to choose for a particular website. Assume that familiarity with a certain language is not important and the implementation can be done in any language. Here are some things that might be important but I am not sure how to rank... |
I am planing to build a website which one of its main features is the usage of pictures. I was wondering what existing techniques are used to prevent offensive pictures (i.e pornography) to get loaded by users. i.e What does Facebook or Pinterest use?
As well I would like to know what your recommendations would be to c... |
Many browsers now disable Java applets by default, requiring them to be enabled on a per-page basis. It seems like applets have not changed much in the past few years. In fact, it seems that client-side Java (applets, desktop applications, ...) is dying completely, and Java is primarily becoming a server-side language.... |
I started coding almost a year ago. By "coding" I mean HTML(5), CSS(3), and only few times I implemented some AJAX and JavaScript. I am interviewing for a position that expects me to know HTML, CSS, JS, JQuery, and AJAX. I feel confident in HTML5/CSS3 subject area and somewhat ok with javascript.
Will agency expect ... |
In order to measure Code Coverage for JavaScript unit tests, one needs to instrument the code, run the tests and then perform post-processing.
My concern is that, as a result, you are unit testing code that will never be run in production. Since JavaScript isn't compiled, what you test should be precisely what you exec... |
I'm writing my first programming language that is object orientated and so far so good with create a single 'class'. But, let's say I want to have to classes, say ClassA and ClassB. Provided these two have nothing to do with each other then all is good. However, say ClassA creates a ClassB--this poses 2 related questi... |
I am going to make a compiler for C and looking up on how compilers work on Wikipedia has told me a lot. However, after reading up on lexers has confused me. The Wikipedia page states that:
the GNU Compiler Collection (gcc) uses hand-written lexers
I have tried googling what a hand written lexer and have come up with... |
Today I encountered this little PHP gem called variable variables.
$literal = "Hello";
$vv = "literal";
echo $$vv; // => prints "Hello"
Are there actually any real use-cases for this language feature?
|
I work 40 hours as a programmer, and by the time I get home, the last thing I want to do is code some more. However, I feel like I am not getting better, and I do love software engineering. So how do you guys find the time/motivation to improve your craft outside of work?
|
If I use an existing open source project that is hosted for example on github within one of my projects, should I check in the code from the other project into my public repo or not? I have mixed feelings about this, #1 I want to give proper credit and attribution to the original developer, and if appropriate I will co... |
I realize that this may spur a religious discussion, but I discussed this with friends and get great, but conflicting answers and the actual documentation is of little help.
What does the 500 series response codes mean from the webserver? Internal Server Error, but that is vague. My assumption is that it means that som... |
I really love the idea of domain driven design, however, as I'm learning Go, I'm wondering if there's the equivalent of DDD that's aimed at an effectively more functional language?
|
Is there a convention for writing Python when deprived of newlines and whitespace? For example, stackexchange comments, Twitter, text messages...
|
Inspired by the numerous posts about the importance of learning Lisp/Scheme I started to learn Scheme two days back, I am using the book "The little Schemer" and have completed half of it.
But I still haven't learned anything new, the book teaches about recursion which I already understand and uses lambda (which I can ... |
I cannot count the number of times I read statements in the vein of 'unit tests are a very important source of documentation of the code under test'. I do not deny they are true.
But personally I haven't found myself using them as documentation, ever. For the typical frameworks I use, the method declarations document t... |
This question got me thinking what products of the programming effort belong to the employer, and what don't.
The two extremes are (0) the code - it apparently belongs to the employer and (1) the learned personal and technical skills. But what is in between? Who owns the pseudocode/algorithm? Who owns the general idea... |
I have been supporting a LOB winforms application for a client the last 3 years. The application is built with a simple monolithic architecture and uses .NET 2.0.
The application is a core part of their operations and its longevity is paramount. It needs to evolve with their evolving business processes, as well as impl... |
I work on several areas related to information visualization, linked data, computer vision and other stuff, so mainly front-end. I am not really happy with the fact that visualizations take lots of iterations and lots of time from first prototype to production ready code. So here is the question: what can I do to impro... |
I was attempting to find a best practice for modeling the tiers in a Java EE application yesterday and couldn't come up with anything current. In the past, say java 1.4, it was four tiers:
Presentation Tier
Web Tier
Business Logic Tier
DAL (Data Access Layer ) which I always considered a tier and not a layer.
After ... |
I am attending a Computer graphics course after the summer. I have read lots of good things about the book "Computer Graphics: Principles and Practice in C" for people who are willing to put in some work. My school does not focus on C/C++ until next year, so I have decided to learn Python this summer and get good at Py... |
We've developed a Web Application using ASP.NET and Sql Server. We've started selling it and of course are still continue improving and developing it.
How do we go about updating each client's version of the site? We have, maybe, 50 customers. So 50 different folders and 50 different db's sounds like a bad idea. Is the... |
Many larger OSS projects maintain IRC channels to discuss their usage or development. When I get stuck on using a project, having tried and failed to find information on the web, one of the ways I try to figure out what to do is to go into the IRC channel and ask.
But my questions are invariably completely ignored by t... |
Code formatting matters. Even indentation matters. And consistency is more important than minor improvements. But projects usually don't have a clear, complete, verifiable and enforced style guide from day 1, and major improvements may arrive any day. Maybe you find that
SELECT id, name, address
FROM persons JOIN addre... |
I'm going through some training on objective-c. The trainer suggests setting single character parameter names. The .NET developer in me is crying. Is this truly the convention? Why?
For example,
@interface Square : NSObject
{
int size;
}
-(void)setSize: (int)s;
I've seen developers using underscores int _size t... |
I just took a programming competition question and I absolutely bombed it. I had trouble right at the beginning itself from reading the input set. The question was basically a variant of this puzzle http://codercharts.com/puzzle/evacuation-plan but also had an hour component in the first line(say 3 hours after start of... |
When it comes to performance:
What is the better way to validate the user input?
If you think about a phone number and you only want numbers in the database, but it could begin with a 0, so you will use varchar:
Is it better to check it via the entity model like this:
@Size(min = 10, max = 12)
@Digits(fraction = 0, i... |
If we don't have the free and the paid apps on the Apple app store yet, how would we program in the free version to link to the paid version because the link is not there yet?
Do we have to have a webpage as a placeholder to do the forward, for this first, initial case? Is this the only solution and what if we don'... |
I am in the middle of refactoring code and would like to get some ideas on variable naming so that my new names clearly represent the data they hold.
I have a class called ContactMethod which makes sense to me; each instance is a different way to contact someone. My problem comes when naming the properties of ContactM... |
I'm a student working with various techniques of programming, and I've come across pseudocode and flowchart. I know that these are both used in order to think through the problem before actually programming, but I have a few questions with this.
When would I use pseudocode to plan out and when would I use flowcharts? ... |
Our business analysts pushed hard to collect data through a spreadsheet. I am the programmer responsible for importing that data. Usually when they push hard for something like this, I never know how well it will work out until a few weeks later when I have time assigned to work on the task of programming the import ... |
I'm buying a new laptop that I'll be using mainly for programming. A couple of options that really intrigue me are the Asus Zenbook UX31A and the new Retina Macbook Pro. It's obvious that the high-resolution displays on these laptops is useful for entertainment, photo-editing, and other things. My question is this: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.