instruction stringlengths 34 19.9k |
|---|
Is there any difference between the two topics? I have seen companies asking for Good Programming knowledge some Good Programming logic.
I have seen this in Job profiles for a developer – for e.g. "good Programming logic", "strong Programming knowledge".
I believe that Programming knowledge is related to knowledge abou... |
I want to know if the structure for an ASP.NET website I'm working on uses a design pattern for it's web pages. If it is a design pattern, what is it called? The web pages have the following structure:
UserDetails page (UserDetails.aspx) - includes UserDetailsController.ascx user control. UserDetailsController.ascx in... |
What's the best way to give the end-user of my web application the ability to open, edit and save (via browser) word documents that are stored in my database?
I have this working by doing an html conversion of the file (via Aspose Words) but this method seems not even close to flawless and i'm trying to improve this. I... |
I have been looking for an efficient String trie implementation. Mostly I have found code like this:
Referential implementation in Java (per wikipedia)
I dislike these implementations for mostly two reasons:
They support only 256 ASCII characters. I need to cover things like cyrillic.
They are extremely memory ineffic... |
Can the Strategy design pattern entirely replace delegates?
In Java, for example, there are no delegates. Is it possible to gain all the features of delegates by using Strategy design pattern?
Edit: I see there is some ambiguity in my question. By delegates I mean the feature of the language, C# for instance.
|
I have joined an ongoing project, where the team calls their architecture "component-based". The lowest level is one big database. The data access (via ORM) and business layers are combined in various components. E.g., there's a component for handling bank accounts, one for generating invoices, etc. So every component ... |
Summary:
We are looking to expand our use of email for notification purposes. We understand it will generate more inbox volume, but we are being selective about which events we fire notification on in order to keep the signal-to-noise ratio high.
The big question we are struggling with is designing a system that guara... |
I need to prepare an internal product release road-map for product being built via scrum methodology, and have some difficulty correlating sprints to the road-map.
The main problem is that as I don't have effort estimations for every story, because these prepared immediately before each sprint, so I don't know what wil... |
I am learning assembly language for x86 architecture. But, i am unable to find any practice problems so that i can test my skills. Can you suggest me some practice problems or some small assembly language project to improve my skills.??
thanks in advance
|
I've been reading Martin Fowler's note on Continuous Integration and he lists as a must "Everyone Commits To the Mainline Every Day".
I do not like to commit code unless the section I'm working on is complete and that in practice I commit my code every three days: one day to investigate/reproduce the task and make som... |
I have two objects that represent a 'Bar/Club' ( a place where you drink/socialise).
In one scenario I need the bar name, address, distance, slogon
In another scenario I need the bar name, address, website url, logo
So I've got two objects representing the same thing but with different fields.
I like to use immutable o... |
I'm addicted to VC++ since 2008, and I begin to work for my current company from 2011 when I graduated in Mathematics. Now I still love VC++, it is a wonderful programming language.
I'm a little confused whether it's a good idea to continue with Windows Programming.
I'm in Beijing, China. Of course, I come from China. ... |
What would you choose as the default Ant target?
In the context of a small visual tool with a user interface, open source.
I was thinking about jar because the project's distributable is the jar file.
But someone prefers to have help as the default target, to show the available targets.
Or maybe another target? I doubt... |
I am willing to work on a personal project that I would like to release publicly. I am working with Silverlight and have experience with XAML, as it is my full-time job.
It is enjoyably for me to create UIs in Blend and XAML. I am also a big fan of C# language. I don't know what I would do without LINQ now.
Anyways, I... |
I've been programming (obsessively) since I was 12. I am fairly knowledgeable across the spectrum of languages out there, from assembly, to C++, to Javascript, to Haskell, Lisp, and Qi. But all of my projects have been by myself.
I got my degree in chemical engineering, not CS or computer engineering, but for the fir... |
I have a legacy C code on my hands, and I am given the task to filter dead/unused symbols and paths from it. Over the time there were many insertions and deletions, causing lots of unused symbols. I have identified many dead variables which were only being written to once or twice, but were never being read from.
Both... |
JavaFX has provided a bunch of new Property objects, such as javafx.beans.property.DoubleProperty which allow you to define fields which can be automatically observed and synchronised.
In many JFX examples, the MVC model class has a number of these Property fields, which can then bind automatically to the view.
However... |
I have a website to design. I have information on how the page should look and interact. The problem is I'm not good in front-end design, and have put many many hours to get the hang of the stuff. Currently I use the CSS from sample sites in github to style my site, which seems to be an un-ethical way.
Question: how d... |
Over time I could understand two parts of SOLID – the “S” and “O”.
“O” – I learned Open Closed Principle with the help of Inheritance and Strategy Pattern.
“S” – I learned Single Responsibility principle while learning ORM (the persistence logic is taken away from domain objects).
In a similar way, what are the best re... |
Is it possible to fetch commit messages from bitbucket via json or something so that a project manager can see what the changes are without having to look at the code. If it's possible can you give me some ideas on how to do it.
|
I'm learning T-SQL. From the examples I've seen, to insert text in a varchar() cell, I can write just the string to insert, but for nvarchar() cells, every example prefix the strings with the letter N.
I tried the following query on a table which has nvarchar() rows, and it works fine, so the prefix N is not required:
... |
As freelancers, we meet somewhere and chat about a new idea for a project, brainstorm etc. Up to this point, we have taken notes of the ideas, but we would like to be able to share more efficiently the ideas with each other. However, I fear that if I use some online product (such as Google Docs) these ideas could be se... |
I am having a difficult time understanding Facebook's internal "e-commerce microcosm" and what it allows Facebook App developers to do (and what it restricts them from doing).
Two use cases:
I'm an e-com retailer selling clothes and coffee mugs (real-world goods) on my website; I want to write a Facebook App that allo... |
I work for a small company and have been designing a GUI to interface our embedded system. The problem with this embedded system is that it is not a finished product (may never be) and is constantly under development and being tweaked and updated for different customers and applications in small volumes.
So to deal ... |
I have a chunk of code that looks something like this:
function bool PassesBusinessRules()
{
bool meetsBusinessRules = false;
if (PassesBusinessRule1
&& PassesBusinessRule2
&& PassesBusinessRule3)
{
meetsBusinessRules= true;
}
return meetsBusinessRules;
}
I believe the... |
Problem
I have a big state machine. The design requirements of the project have changed such that I need to re-use this state machine in another place. All the states remain the same in this new place, but a few states run slightly different stuff. What design pattern allows me to reuse this state machine?
Motivation
I... |
I don't hang out on Programmers enough to know whether this question is "ok", so my apologies if not. I tried to make the title obvious so at least it can be closed quickly :-)
The question is simple. My employer wants "home screen presence" (or at least the possibility thereof) on iOS devices (also Android but I'm mos... |
I have to query a large data-set (~500 MB) using a sqlDataReader but I have to save the data in three different formats. Instead of querying the database 3 times I'm thinking about saving the data to an in-memory table and then save the data from there.
Is there a practical limit to a table size in memory? Any ideas f... |
I am planning on building a web app with many different public-facing HTTP servers; each of which will have Google Analytics (GA) installed on them.
I'd like to create a "dashboard" app that consolidates the GA data into one screen. I've been perusing the documentation for this so-called GA API, but I can't tell what t... |
I am relatively new to iOS development, so after watching a bunch of WWDC videos announcing new awesome features for the iPhone SDK, I still got a few questions regarding their support for older devices. Specifically:
Do the new compiler features (such as literals support, auto-synthesize, etc) require iOS 6 on the ta... |
I am aware of the PhoneGap toolkit for creating mobile applications for virtually all mobile platforms with a significant market share. However, the code in PhoneGap that is shared between the different platforms is written in JavaScript. While I like JS, I think it's hardly appropriate for computationally intensive ta... |
Sorry if this question has been asked before, but I couldn't find anything usable.
I'm working on a project for a client and currently I have to loop through the users table which is about 3000 records and still growing.
I have to do some calculations on a nightly basis which I am going to be using cron/php. The calcu... |
I'm making a simple multiplayer game of Tic Tac Toe in Python using Bridge (its an RPC service built over a message queue - RabbitMQ) and I'd like to structure it so that the client and the server are just one file. When a user runs the game, he is offered a choice to either create a game or join an existing game. So w... |
Suppose I'm a teacher and I want to explain to my students what are the benefits of using RAII in C++: I need a very good example, full of details, but that is easy to understand.
Which approach would you use?
|
I want to use JTAPI (1.4 - latest) to create an app that will call my phone whenever I need it to. I downloaded JSR043 (JTAPI specification) and have been reading the API docs and it seems pretty straight forward with respect to how to code JTAPI.
However I seriously doubt that getting a Java app on my laptop to call m... |
I was told that in order to support AES256 encryption inside my Java app that I would need the JCE with Unlimited Strength Jurisdiction Policy Files.
I downloaded this from Oracle and unzipped it and I'm only seeing 2 JARs:
local_policy.jar; and
US_export_polic.jar
I just want to confirm I'm not missing anything here... |
I was in a heated discussion the other day, about whether or not it's practical to have a perfect validation score on any HTML document. By practical I mean:
Does not take a ridiculous amount of time compared to it's almost-perfect counterpart.
Can be made to look good on older browsers and to be usable on very old br... |
I store sessions in a SessionManager. The session manager has a dependency to ISessionPersister.
SessionManager
private readonly ISessionPersister sessionPersister;
public SessionManager(ISessionPersister sessionPersister)
{
this.sessionPersister = sessionPersister;
}
ISessionPersister
public interface ISessionPe... |
This may seen like a weird question, but since we're challenged--as engineers--to constantly adapt to changing technologies, we always find ourselves buried in documentation. That said, we also need to consider that time is of the essence because people want their stuff fixed and improved with little hesitation if any... |
In the discussion here, the comments in the accepted answer suggest that I approach the given code from a functional perspective, which was new to me at the time. Wikipedia said, among other things, that FP "avoids state and mutable data", which includes according to the discussion global vars. Now, being that I am alr... |
Recently I have often read that, since the trend is to build processors with multiple cores, it will be increasingly important to have programming languages
that support concurrent and parallel programming in order to better exploit the parallelism offered by these processors (see e.g. this video for some background.).... |
I found that some of the code that Oracle uses is very useful so I don't have to re-invent the wheel.
Given this is at the top of the file where the code in question is:
/*
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* ... |
A "Heap Pollution" as in Non-Reifiable Types (The Java™ Tutorials > Learning the Java Language > Generics (Updated))
Why is it called that way?
|
I am taking a course in OOA/D this semester. I have some doubts about Object Oriented Programming.
Is it true that Object Oriented programming can be done without any specific modelling like OMT?
What are the models available for object Oriented software development?
|
The most unusual aspect of Python is that whitespace is significant
instead of block delimiters (braces → "{}" in the C family of languages), indentation is used to indicate where blocks begin and end.
how can python interpreter recognize code block ?
|
I have a specific programming need where I need to efficiently store large sorted sets in memory, query them for ranges, and intersect them against other sets that are also queried for ranged.
I am looking at Redis, but I can't see a range slice command. MongoDB can only use 1 index, so it has to perform row-level scan... |
I have a repo with Ruby and PHP code in it.
Github says my repo is 74.8% PHP and 25.2% Ruby
I do not understand how this can be. When I compare the 2 languages in my project:
# Count how many files:
# Ruby
ls | grep ".*\.rb" | wc -l
# returns 10
#PHP
ls | grep ".*\.php" | wc -l
# returns 1
# Count how many lines, w... |
I'm building and application that requires huge transactions/sec of data and I need to use IPC to for the mutithreaded mutliprocceses communication, I know that there are a lot of methods to be used but not sure which one to choose for this application.
This is what the application is gonna have,
4 processes, each pro... |
I'm in between jobs in my field (unrelated to software development), and I recently picked up a temporary side contract writing a few applications for a firm. I'm the only person working on these specific applications. Are there ways I should be checking myself to make sure my applications are sound? I test my code, tr... |
I am using a piece of hardware with a well defined C API. The hardware is stateful, with the relevant API calls needing to be in the correct order for the hardware to work properly. The API calls themselves will always return, passing back a flag that advises whether the call was successful, or if not, why not. The har... |
I've been doing MVC for a few months now using the CodeIgniter framework in PHP but I still don't know if I'm really doing things right.
What I currently do is:
Model - this is where I put database queries (select, insert, update, delete). Here's a sample from one of the models that I have:
function register_user($user... |
I have read this (Database design: 3 types of users, separate or one table?)
I decided to put admin and normal user in one table since the attributes are similar:
fullname,
address,
phone,
email,
gender
...
Then I want to draw ERD, suddenly my mind pop out a question. How to draw?
Customer make appointment and admin a... |
I feel like I have burned out, even though I am only out of college for 5 years.
For the first 3 years of my career, things were going awesome. I was never anything special in school, but I felt special at my company. Looking back, I could tell that I made all the right moves:
I actively tried to improve myself daily.... |
Quick background: we're a small web agency (3-6 developers at any one time) developing small to medium sized Symfony 1.4 sites. We've used git for a year now, but have previously used Subversion.
For the past 6 months we've put a lot of development time into a central Symfony plugin that powers our custom CMS. This pl... |
I'm curious about the birth of the compiler. How did programming begin? Did people first build hardware that recognized a certain set of commands, or did people define a language and then build hardware around it? And on a related note, what was the first programming language?
|
My colleague and I have dispute. We are writing a .NET application that processes massive amounts of data. It receives data elements, groups subsets of them into blocks according to some criterion and processes those blocks.
Let's say we have data items of type Foo arriving some source (from the network, for example) o... |
I am currently undertaking a software project on my own time. When I first got the project I put in many hours working out how to do the "tricky" parts of the solution. I spent many hours googling and reading up on classes available on MSDN that I could use for the project. I was madly excited and passionate about doin... |
I am currently architecting and designing an exciting new web application that will be entering into some areas that I have very little experience in, game development.
The application is not necessarily a game, but there are some very time sensitive tasks and scheduled jobs that a server will need to run to perform ga... |
I am considering outsourcing the development of an iOS app to various independent developers. I will have have various testers of the app. We all work for separate companies. Some of these testers will be customers, who I would like feedback from. As there are multiple developers involved I expect there to be a new rel... |
The company I work for uses vb.net since there are many programmers who moved up from vb6 to vb.net. Basically more vb.net resources in the company for support/maintenance vs c#. I am a c# coder and was wondering if I could just continue coding in c# and just use the many online free c# to vb.net code convertors. That ... |
Why Browsers do not resolve simple known issues such as:
(in the context of CSS)
Do NOT start a class name with a number! This is only supported in Internet Explorer
and
Do NOT start an ID name with a number! It will not work in Mozilla/Firefox.
|
I'm currently working on an application that does a lot of time-bound operations. That is, based on long now = System.currentTimeMillis();, and combined with an scheduler, it will calculate periods of time that parametrize the execution of some operations. e.g.:
public void execute(...) { // executed by an scheduler ea... |
We are designing a differencing algorithm (based on Longest Common Subsequence) that compares a source text and a modified copy to extract the new content (i.e. content that is only in the modified copy). I'm currently compiling a library of test case data.
We need to be able to run automated tests that verify the test... |
This comes from a closed thread at stack overflow, where there are already some useful answers, though a commenter suggested I post here. I hope this is ok!
I'm trying my best to write good readable, code, but often have doubts in my work!
I'm creating some code to check the status of some protected software, and have... |
I am looking into making a correctly laid out MVC Auth/ACL system. I think I want the authentication of a user (and the session handling) to be separate from the ACL system. (I don't know why but this seems a good idea from the things I've read.)
What does MVC have to do with this question you ask? Because I wish for t... |
I know what the JIT compiler is but how about why is it called that, it obviously catches exceptions Just in Time, but how and why should it be called this?
Sorry if this sounds a bit vague.
|
Does it make sense to use an ORM in Android development or is the framework optimized for a tighter coupling between the UI and the DB layer?
Background: I've just started with Android development, and my first instinct (coming from a .net background) was to look for a small object-relational mapper and other tools th... |
What is the best way to allow for dynamic fields/database columns? For example, let's say we have a payroll system that allows a user to create unique salary structures for each employee. How could/should one handle this scenario? I thought of using a "salary" table that hold the salary component fields and joining the... |
Is varchar just a remnant from before text came around, or are there use cases where you would want to use a varchar? (Or char for that matter..)
(I use Postgres and MySQL (MyISAM) daily, so those are what I'm most interested in, but answers for other databases are of course welcome. ^_-)
|
Are there any Java open source projects that Pays the developers?
I came across this from a book : Programming Interviews Exposed. Page #25
Are open-source projects preferable?
The vast majority of programming jobs have usually involved
proprietary, closed-source projects, which some programmers find
objectiona... |
So let's say I have a DB table with 8 columns, one is a unique auto-incrementing used as ID. So I have a page that pulls in the info for each row based on query string ID. I want to give my users the ability to propose changes. Kinda like a wiki setup. So I was thinking I should just have another duplicate table or... |
There is this data structure that trades performance of array access against the need to iterate over it when clearing it. You keep a generation counter with each entry, and also a global generation counter. The "clear" operation increases the generation counter. On each access, you compare local vs. global generation ... |
I've got a value that many objects need. For example, a financial application with different investments as objects, and most of them need the current interest rate.
I was hoping to encapsulate my "financial environment" as an object, with the interest rate as a property. But, sibling objects that need that value can't... |
I have a system where data is stored in a persistent store and read by a server application. Some of this data is only ever seen by the server, but some of it is passed through unaltered to clients.
So, there is a big temptation to persist data - whether whole rows/documents or individual fields/sub-documents - in the ... |
What are ways to allow the versioning of database entries (data)?
Think of the content-managment-systems abilities to revert back changes of articles.
What are their pros/cons?
|
For a two player game where, your opponent could be on the network, CPU itself or near you where you would play turn by turn on the same machine.
How do people design classes for re-use ?
I am in a similar situation and have no experience in making such complex games.
But here is what I have thought,
If I am a player ... |
I am NOT doing test driven development and I write my test classes after the actual code is written. In my current project I have a test coverage (Line coverage) of 70% for 3000 lines of Java code. I am using JUnit, Mockito and Sonar for testing. But I feel that I am not actually covering and catching 70% of the proble... |
I was reading this article on MathWorks about improving MATLAB performance and you will notice that one of the first suggestions is to preallocate arrays, which makes sense. But it also says that preallocating Cell arrays (that is arrays which may contain different, unknown datatypes) will improve performance.
But how ... |
I'm in the process of writing my own programming language which, thus far, has been going great in terms of what I set out to accomplish. However, now, I'd like to bootstrap some pre-existing data structures and/or objects. My problem is that I'm not really sure on how to begin.
When the compiler begins do I splice in... |
Is it possible to have a Java standalone application (no application server attached) that exposes some operations that a client can call and be the one to manage the transactions?
I was thinking this application to expose JNDI resources and get a hold of a java:comp/UserTransaction from there, get also a bean from the... |
I have a bunch (thousands) of resources in an RDF/XML file. I am writing a certain subset of the resources to files -- one file for each, and I'm using the resource's title property as the file name. However, the titles are every day article, website, and blog post titles, so they contain characters unsafe for a URI ... |
If I come across a non-critical typo in code (say, an errant apostrophe in a print(error) statement), is it worth making a commit to resolve that error, or should it simply be left alone?
Specifically, I'm curious about weighing the gumming-up of the commit log against the value of resolving these non-critical typos. I... |
My company's head of software development just "resigned" (i.e. fired) and we are now looking into improving the development practices at our company. We want to implement unit testing in all software created from here on out.
Feedback from the developers is this:
We know testing is valuable
But, you are always cha... |
I have a weird situation where a client would like a script that automatically sets up thousands of appointments over several days. The tricky part is the appointments are for a variety of US time zones, and I need to take the consumer's local time zone into account when generating appointment dates and times for each ... |
It has been a few months since I started my position as an entry level software developer. Now that I am past some learning curves (e.g. the language, jargon, syntax of VB and C#) I'm starting to focus on more esoteric topics, as to write better software.
A simple question I presented to a fellow coworker was responded... |
I work at a web design/development shop. Everything we do is centered around the Joomla! CMS. I'm a bit worried-if anything goes wrong with Joomla (major security flaw revealed, Joomla folds and ceases development) we're sunk.
I'm meeting with the CEO to plan the next few steps for our company. Should I recommend ... |
F# comes out of the box with an interactive REPL. C# has nothing of the sort and is in fact kinda difficult to play around without setting up a full project (though LINQpad works and its also possible to do via powershell).
Is there something fundamentally different about the languages that allows F# to have the intera... |
Imagine you're writing some sort of Web Analytics system - you're recording raw page hits along with some extra things like tagging cookies etc and then producing stats such as
Which pages got most traffic over a time period
Which referers sent most traffic
Goals completed (goal being a view of a particular page)
And ... |
This may sound a bit strange, but I'm wondering about a good way to work in Git from multiple machines networked together in some way. It looks to me like I have two options, and I can see benefits on both sides:
Use git itself for sharing, each machine has its own repo and you have to fetch between them.
You can wor... |
I'm a bit disappointed there is almost no discussion of this no matter where I look so I guess I'll have to ask.
I'm writing a cross platform memory bench marking application which requires direct physical address mapping rather than virtual addressing.
EDIT
The solution would look something like the Linux/Unix syste... |
I’m Looking for a definitive answer from a primary or secondary source for why (notably) Java and C# decided to have a static method as their entry point, rather than representing an application instance by an instance of an Application class (with the entry point being an appropriate constructor).
Background and deta... |
Methods:
1. getDistance(CityA,CityB) // Returns distance between two cities
2. getCitiesInRadius(CityA,integer) // Returns cities within a given distance of another city
3. getCitiesBeyondRadius(CityA,integer) //Returns cities beyond a given distance of another city
4. getRemoteDestinations(integer) // Returns all... |
I'm designing a flexible Wizard system that presents a number of screens to complete a task. Some screens may need to be skipped based on answers to prompts on one or more previous screens.
The conditions to skip a given screen need to be editable by a non-technical user via a UI. Multiple conditions need only be com... |
I have a basic understanding of programming and I currently learning C++. I'm in the beginning phases of building my own CLI program for ubuntu. However, I have hit a few snags and I was wondering if I could get some clarification. The program I am working on is called "sat" and will be available via command line only.... |
I have made a program using Java that is an implementation of this project: http://nifty.stanford.edu/2009/stone-random-art/sml/index.html. Essentially, you create a mathematical expression and, using the pixel coordinate as input, make a picture. After I initially implemented this in serial, I then implemented it in... |
I was just wondering if there are any major advantages or disadvantages to using either XAML/C# or HTML5/JavaScript for Metro Apps.
|
I'm a pretty big fan of Sublime. One of my favorite features is the ability to scroll through your file by using the compressed image of your text on the upper right hand corner (minimap). My gut feeling is this does positive things for productivity:
Does having this minimap to scroll through actually improve produc... |
I've been writing in Java and C# for a while, but I'm having a hard time identifying places where using a custom annotation would be advantageous.
I can see that JUnit uses annotations in test classes to identify the order it should run the methods in the test classes, which obviates the need for a configuration of som... |
In a large project you only get to use the technology necessary for that project; smaller projects come and go, and you need to learn more technologies.
On the other hand large projects are usually complex and thus hard; if you are used to hard projects then you should manage to perform well on smaller projects.
So, in... |
The more SQL fields I add to my tables and the more primary/foreign keys I add the more I lose the overview for specific fields for certain scenarios like Get/Add/Delete/Update data.
I use SQL Management Studio (SQL Server) to design my database in the database diagram designer.
Maybe there is a better tool or good app... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.