instruction stringlengths 34 19.9k |
|---|
Recently I have a discussion with some of my colleagues at my work because they said that it's better have in a .DLL a string connection encrypted. And I said why just don't use the string connection defined in the web.config encrypted? it's the same and it's better because entity framework, for example looks for the n... |
I am writing a wiki article and wondering what is the proper way to write a directory scheme?
I am doing something like
main folder
- sub folder
- sub folder
...
But I'm stuck after that.
Any help?
|
A project I'm working on was hosted on a svn repository at bettercodes.org. This was under another user's name and that repository is now unavailable.
The person responsible for the project was sent an export from Eclipse and I had a more or less up-to-date project on my machine. I could see no other option than to com... |
I am a programmer in C and C++, although I don't stick to either language and write a mixture of the two. Sometimes having code in classes, possibly with operator overloading, or templates and the oh so great STL is obviously a better way. Sometimes use of a simple C function pointer is much much more readable and clea... |
I've seen it done as a free-for-all where the scrum master just asks everyone to throw out comments. Or a time-boxed session where "anonymous" comments are posted on the walls bucketed by category. My current team is constrained by being spread out, so it has be done online/over the phone. What is everyone's best exper... |
I'm at the pre-release stage of an open-source PHP project, one which I hope will be used by other developers in their own projects. The project doesn't currently support namespaces and I'm trying to evaluate if it should use namespaces or the PEAR naming convention of Dir_Subdir_Class, which seems to have all of the ... |
Being a relatively new web-developer I am surprised that these libraries didn't exist before. Is there a particular technical or historical reason that at around Sep 2010, a sudden development and interest in client-side javascript RIA applications and libraries?
http://www.google.com/insights/search/#q=backbonejs%2Ca... |
Are complex numbers used in programming? If they are what is their significance? What IDEs and languages use them? And would it be recommended to learn how to implement them for a programming job (if so please specify what job)?
I've been working in Eclipse and just studied the importance of complex numbers in math and... |
I often talk to programmers who say "Don't put multiple return statements in the same method." When I ask them to tell me the reasons why, all I get is "The coding standard says so." or "It's confusing." When they show me solutions with a single return statement, the code looks uglier to me. For example:
if (condition... |
We have a process that may last between a few seconds and a few minutes. As such, we may update just a few records or thousands of them. The process can be committed only when everything has been done correctly.
Recently we have begun having problems when attempting to commit transaction as they were marked as "rollba... |
I am a C# developer.
My observation of the IT industry as a C# developer is that the technology keeps changing or being updated by Microsoft like LINQ, WCF, and WPF etc.
OOP has been the fundamental for all kinds of developments that we see today in any language.
My question is,
Is it good if I am a decent programmer ... |
I'm working on a contract at present where I'm essentially working as a subcontractor for a fairly big digital agency. The real end customer is a big corp.
So far, I have of course done an amazing job :)
The agency had a "spec" up front - basically a "sitemap" for the app. This was my "blueprint".
Inside the first wee... |
The question title may not be correct.
I have worked in a very big ASP.NET web application (without using MVC), there I used a simple error handling strategy :
Enclose every statement in try..catch block
Have a error label on each page at the very top
If any exception occurs then show the error description on the Er... |
My company is going to hire an external developer to create some new modules and fix some bugs in our PHP software.
We have never hired an external developer by the hour before. How can we protect the source code? We are not comfortable giving out source code and were thinking that everything remained under a surveilla... |
I'm a proponent of properly documented code, and I'm well aware of the possible downsides of it. That is outside of the scope of this question.
I like to follow the rule of adding XML comments for every public member, considering how much I like IntelliSense in Visual Studio.
There is one form of redundancy however, wh... |
I have the following problem: I have a database containing more than 2 million records.
Each record has a string field X and I want to display a list of records for which field X contains a certain string. Each record is about 500 bytes in size.
To make it more concrete: in the GUI of my application I have a text field... |
I'm simulating a double click programmatically and I want to have a slight pause between both clicks in order to better simulate a real user.
I know the interval should be less than GetDoubleClickTime but am not sure what would be a good time to choose. Does anyone know of any data on how fast a typical person perform... |
Is this an antipattern? It is an acceptable practice?
try {
//do something
} catch (Exception e) {
try {
//do something in the same line, but being less ambitious
} catch (Exception ex) {
try {
//Do the minimum acceptable
} catch (Exce... |
Warning: This is a long post.
Let's keep it simple. I want to avoid having to prefix the new operator every time I call a constructor in JavaScript. This is because I tend to forget it, and my code screws up badly.
The simple way around this is this...
function Make(x) {
if ( !(this instanceof arguments.callee) )
r... |
I know that in general cookies themselves are not considered robust enough to store authentication information.
What I am wondering is if there is an existing design pattern or framework for sharing authentication across subdomains without having to use something more complex like OpenID.
Ideally, the process would be ... |
I'm developing a multilingual PHP web application, and I've got long(-ish) texts that I need to translate with gettext. These are email templates (usually short, but still several lines) and parts of view templates (longer descriptive blocks of text). These texts would include some simple HTML (things like bold/italic ... |
I'm interested in books that would introduce / explain the theory behind programming and programming languages. My logic is that by truly understanding the theory behind programming it will only take a few weeks to pick up new languages and implement some simple software.
As far as the type of books I'm looking for th... |
I hear a lot about keeping methods short and I've heard a lot of programmers say that using #region tags within a method is a sure sign that it is too long and should be refactored into multiple methods. However, it seems to me that there are many cases where separating code with #region tags within a method is the sup... |
Call me paranoid, but I really like to keep my stuff secret, but readily available on the cloud. So, asking this question.
How safe and reliable is encryption software (e.g., truecrypt)? The reason I ask is that, what is I encrypt my data today with this software and after a couple of years, the software is gone ! Wha... |
I have an open source project, but I don't want to use my real name in the license file. Legally, can I just use my project hosting username instead?
I know programmers Are Not Lawyers™, but I'm looking for advice from people who may have dealt with simlar problems.
|
Take the following tree:
50
40
30
20
10
Which node will be balanced first? 50 or 30
Case 1: 50
The tree is
30
20 40
10 50
Case 2: 30
The tree is
40
/ \
20 50
10 30
Well,... |
My company wants to start using Scrum, and in real scrum there is no place for a real team leader (manager).
What is the next step for the dev team leader? Should I be a (chief) system architect/tech leader or search for another job in management?
I like the management part and the technical part and the target is VP ... |
I just purchased the book 'Pearls of Functional Algorithm Design' by Richard Bird. Unfortunately, the book doesn't have any section that describes the notation that is used.
You can view the contents of the book by going to Amazon's page, and clicking on the book cover to get a sneak peak inside.
http://www.amazon.com... |
My company needs to hire a PHP developer, but nobody has PHP knowledge in my company and we find difficult to test for PHP skills. If it were a C/Java developer I would ask him to write a quick implementation of the Game of Life, but PHP is a completely different language.
I saw this test with interest:
http://vladalex... |
I stumbled upon Greg Young's talk 7 Reasons why DDD Projects Fail where he mentions something he calls DDD-Lite at 7:20.
Summarizing, he basically says some use DDD as a pattern languages (entities, repositories, value objects, services, etc) without doing anything else related to DDD. He postulates 60% or more of doma... |
I'm intrested to know if there exists a tool that lets you input examples of valid documents and lets you then generalize from that to a reusable parser.
I can imagine this, but everytime i start learning about parsers it gets to the granularity of something like lex and yacc and it seems more complicated than my insti... |
In my spare time, I've been designing a CMS in order to learn more about actual software design and architecture, etc.
Going through the SOLID principles, I already notice that ideas like "MVC", "DRY", and "KISS", pretty much fall right into place. That said, I'm still having problems deciding if one of two implementat... |
For a long while the default guide to latest standards support for browsers was the Acid 3 Test. I've just run this on Windows 7 (x64) for Chrome 15.0, Firefox 7.0, Safari 5.1 and IE 9.0 and they all score 100. Some of the animations could be smoother but on the whole there's not much to differentiate them.
I've then l... |
I'm a senior in college that hasn't done much image processing before (except for some basic image compression on smartphones). I'm starting a research project on machine learning next semester that would require some biomedical image processing. What's the best way to get up to speed with the basics of image processin... |
My classes are following this structure
Service Tier (creates and maps InputDTO to DB Data)
DAO Tier (actually executes DB calls)
When I write service tier JUnit tests, the DAO tier is called, and this expects an actual DB connection and getting data from the DB.
Should I be mocking the DAO tier completely from the s... |
I'm looking to hire developers and I wish to test them. I have been especially told by my boss that we should have programmers on board that can consult on banking sector software and I'm to come up with the test. Now I've never done Java EE development in depth and my knowledge of it isn't the greatest but I've not ha... |
If I have a datastructure which is the fastest way I could insert values into it in a specified range?
For example if I had a method:
myDatastructure var=new myDataStructure();
var.insert(2,1000);
it would mean that I get a most optimised way of getting a datastructure holding values from 2 to 1000 in each of index se... |
I would like to set up my computer so that I can develop in .net, C#, Java, ActionScript, JS/CSS, and functional languages such as Scala or Haskell. However, I want to do this with the least amount of full-featured IDEs to learn / programs taking up harddrive space on my computer / running multiple IDEs simultaneousl... |
Sometimes I stare blankly into space or sketch ideas and write some pseudo codes on paper. Then I scratch it out and start again, then when I think I have the correct solution for the problem I begin writing the code.
Is it normal to think for days without writing any code? Is this a sign that I am approaching the prob... |
I am currently developing a hosted solution in ASP.NET using MVC3 and Entity Framework. This product will then be made available to a number of clients as a hosted solution.
As the data stored by each client will be critical to their business, we anticipate that many of them will insist that the data is stored in an en... |
The company I work at recently hosted a web service in Windows Azure and announced that. Now trade online magazines say lots of meaningless stuff like "company X moves to the cloud", "company X drops desktops for the cloud", etc.
Looks like there're lots of materials out there (starting with Wikipedia) that are very le... |
I'm experimenting with automatic deployment / continuous integration and had a talk with my team lead.
I told him I'm investigating creating build/deployment scripts in PowerShell and he said automatic deployment is very easy to set up in TFS using a GUI and I should research that instead. I have zero experience with T... |
I have seen other developers using static classes as namespaces
public static class CategoryA
{
public class Item1
{
public void DoSomething() { }
}
public class Item2
{
public void DoSomething() { }
}
}
public static class CategoryB
{
public class Item3
{
public... |
Here's a common situation:
You need to implement a bulk operation in an application that uses an ORM framework.
After the first pass, you've noticed significant performance problems.
Here's my question:
In this situation, should you favor a solution that includes raw SQL?
Or are there well-known design patterns th... |
This is an Agile development project and I do not have the ability to change that.
The design that will be the fastest and most obvious for the first phase of our project will not be compatible with the needs of our second phase. The change would not be difficult to implement now but it would take a little more time t... |
To my way of thinking, a for loop is used to iterate over a known or determinable range.
String[] names = //something;
for ( int i = 0; i < names.length; i++ ) { //do stuff }
which is equivalent (scoping of i aside) to :
String[] names = //something;
int i = 0;
while (i < names.length )
{
// do stuff
i++;
}
In ... |
I read here that you should avoid coding JavaScript inline (see item #1).
It sounds like a great idea; however, I'm not sure how to use js to select dynamic content without setting the id in the function call inline.
For example, I have a simple blog. The comments are hidden, but can be displayed by clicking an anchor ... |
Can you use Google Analytics to track visitors/downloaders for a Google Code project?
I've searched google for an answer but I get results about Google Analytics as a Google Code project itself and not for applying it to a Google Code project for visitor/download data.
|
This question is being asked for the purposes of evaluating whether or not attempting to use things I picked up in college was a good idea, or even remotely defensible.
Last year I wrote a 'formula creator' for figuring out what to do with fields or how to populate fields of HL7 data. The fact that it's HL7 data is al... |
I have a question that I did not find an answer for except the following answer that does not meet my requirements:
"Because James Gosling didn't want to"
I know that Java can have interfaces (only pure virtual functions, no attributes), but it is not the exact same thing as class definitions.
|
If I were to download some open source code that does some neat thing that I am needing, but doesn't have nearly as many options or bells and whistles that I need... and I make a TON of changes to where some of the base code is still there from the open source project, but a lot has changed and a lot has been added... ... |
We all know what a value is. A type is the type of a value. A kind is (loosely) the type of a type. A type constructs a value; a kind constructs a type. So what is the type of a kind, a thing that constructs kinds?
Is there such a thing? Does it have a name? Is it useful?
|
On my team, we often require the most senior programmers to train/mentor the brand new junior programmers. However, these same senior programmers are the ones who are doing the bulk of the real, important work.
I've tried to argue to my manager that it makes sense to have the junior programmers, who are showing a high... |
Possible Duplicate:
When is optimization not premature and therefore not evil?
Whilst designing my own .Net SQL access library, I found that I want everything thing to run as fast as possible so I tend to look at the fastest ways of doing things. This often gets criticised as pre-mature optimisation when I am just l... |
We have a lot of programming languages. Every language is parsed and syntax checked before being translated into code so an abstract syntax tree (AST) is built.
We have this abstract syntax tree, why don't we store this syntax tree instead of the source code (or next to the source code)?
By using an AST instead of the ... |
I'm starting to learn Vim, and following some of the advices given here in stackexchange. I'm beginning to use it in some toy projects and I'm cool with that.
But I started to wonder how you can be productive without opening other files all the time just to know how's that class' Name, what's that macro included in oth... |
For the first time I'm in the position where I'm helping interview potential front-end developers. The other interviewer is more business & PM-focused, although he is a former developer. I probe for knowledge and background in CSS, Javascript, and other related technologies, but those questions are really just testing ... |
I currently have a website that has been recently completed. I'm contemplation using a freelance service such as SO for all future components. There is a considerable amount of work to be completed on-top of the existing infrastructure.
I've tried searching for an answer to this question, but it's so generic in terms ... |
I am, and like being, a VB.net coder. I have a couple of largish programs in c# that I must maintain and I don't really like writing C# code while developing. It isn't horrible but I much prefer the VB.net environment for development.
However recently I have started writing all my tests in C#. I started doing this so I... |
There are many resources on general project management, but are there any specifically for non-technical people for software project management, covering topics such as requirements gathering, use cases and general architecture?
|
I am reading an analysis on dynamic arrays (from the Skiena's algorithm manual).
I.e. when we have an array structure and each time we are out of space we allocate a new array of double the size of the original.
It describes the waste that occurs when the array has to be resized.
It says that (n/2)+1 through n will b... |
Possible Duplicate:
How do I pick up a new language quickly, given I know several others?
I started a new job working on an application I'm vaguely familar with, and it's in PERL! I come from a PHP and Java background, so while I understand the basics, there are lot of nuances in PERL that make it troublesome.
updat... |
I've been working on an iPhone app for the past month and am interested in open sourcing some of its code. I built a few categories that others might find useful for generating filler data during testing and debugging, and I also made a view controller for displaying images that others might like to include in their ow... |
When writing a program, should I write tests that ensure that the dependencies I use are working? Those might help to check my assumptions about them, and may also help when deciding to upgrade said deependencies.
Also, are there any established opinions or schools about whether or how one should go about that?
|
This is a somewhat subjective quesiton but I'd love to hear feedback/opinions from either interviewers/interviewees on the topic.
We split our technical interview into 4 parts. Write Code, Read & Analyse Code, Design Session & Code on the white board.
For the last part what we ask interviewees to do is write a small co... |
Our system has several utility classes.
Some people on our team use (A) a class with all-static methods and a private constructor.
Others use (B) a class with all-static methods (these the juniors).
On code analysis, (A) and (B) raise warning CA1052, which recommends marking the class as sealed.
Included in the MSDN do... |
TDD means to test before you start writing production code. So I start writing a test for MyClass called MyClassTest. It fails and I start to implement the wanted functionality in MyClass.
During the implementation phase of MyClass I encounter that changes on another class (e.g. MyClassUtils) are needed to be done. MyC... |
I am sure some else has experienced the problem of documentation regarding unit tests. I was wondering if anyone has used javadocs with their unit testing to generate their own internal javadoc files to keep track and document their unit tests? If so, did you find it successful? Or you think this a bad way to document ... |
I am interested in encoding a string I have and I am curious if there is a type of encoding that can be used that will only include alpha and numeric characters and would preferably shorten the number of characters needed to represent the string.
So far I have looked at using Base64 encoding to do this but it appears t... |
My problem
Our MVC based framework does not allow us to cache only part of our output. Ideally we want to cache all static and semi-static parts, and run dynamic parts. In addition, we need to consider data caching that reacts to database changes.
My idea
The concept I came up with was to represent a page as a tree of... |
At the moment we are writing modules for an open source cms.
We would like to sell these with a license.
But which are the best options?
Any suggestions and experiences.
|
At the place where I work, there are explicit guidelines for placement of declarations of variables. According to that, it is required to put them at the global level and / or at the beginning of functions, and not in inner blocks (such as a for loop). Since they've been specified by persons more experienced than I am,... |
Often, when I am initializing something I have to use a temporary variable, for example:
file_str = "path/to/file"
file_file = open(file)
or
regexp_parts = ['foo', 'bar']
regexp = new RegExp( regexp_parts.join('|') )
However, I like to reduce the scope my variables to the smallest scope possible so there is les... |
I apologize if this tends more toward design that programming, but here goes.
What design would you recommend for a database that is
Memory resident
Must run on windows, linux and (at a stretch) the mac
Accept multiple queries simultaneously
Have minimum overhead, since a search is expected to take <0.25s
This progra... |
We are currently migrating our Visual Basic 6.0 program to .NET. The target audience are just normal desktop users at home. Discussing this, we realized that we cannot come up with mainstream programs that seem to be written in .NET. Are we mistaken? Is there a good reason for this?
|
Possible Duplicate:
Dealing with frustration when things don't work
Something I find myself coding something difficult and after hours of struggle my mind goes blank and I don't know what I am doing anymore.
I'm not sure if this happen to a lot of programmers. Does this happen to you How do you deal with it?
|
I have seen this before. Management wants to be agile and be scrummified, but does not want to step out of the status quo. My latest observation is no different; here, the Scrum is 'tailored' to the organization; specifically into a weird many-people-process.
Here http://img684.imageshack.us/img684/6175/modifiedscrum... |
I am reading the epilogue of the Anniversary Edition of the Mythical Man Month. The author, Frederic Brooks, says
Still vivid in my mind is the wonder and delight with which I - then 13 years old - read the account of the August 7, 1944, dedication of the Harvard Mark I computer...
Which text is he referring to?
I wa... |
Im trying to work out if generic programming was a functional programming feature which was then introduced into Java, C++ and C# or did the latter copy it from the functional programming languages like Haskell, Lisp, OCaml etc?
Google is giving me lots on what generic programming is, but not where it originated. All I... |
Possible Duplicate:
I'm graduating with a Computer Science degree but I don't feel like I know how to program
I finished University around 4 years ago double degree in Software Eng/Comp Sci. Got my first job at a startup in my final year, was with them for 2.5 years then started my own business.
So far everything is... |
Except for a blog post here and there, describing the custom attributes someone created, but that do not seem to get any traction - like one describing how to enforce immutability, another one on Documenting Thread Safety, modeling the attributes after JCIP annotations - is there any standard emerging? Anything MS migh... |
I am a C# developer and had developed simple websites in regular asp.net(with asp.net controls) and a wpf application.
Nowadays, I am trying to learn Asp.net MVC3 and I have been exposed to HTML with the Razor view Engine. To be honest, my knowledge of HTML and CSS is limited. Therefore, I keep posting questions now a... |
I’m developing a simple peer-to-peer app in .Net which should enable users to share specific content (text and picture files). Inappropriate content can “relatively” easily be identified / controlled in a centralized environment. But what about a peer-to-peer network, what are the best methods to protect a decentralize... |
Though I use and like DVCS for my personal projects, and can totally see how it makes managing contributions to your project from others easier (e.g. your typical Github scenario), it seems like for a "traditional" team there could be some problems over the centralized approach employed by solutions like TFS, Perforce,... |
My workplace recently switched to Git and I've been loving (and hating!) it. I really do love it, and it is extremely powerful. The only part I hate is that sometimes it's too powerful (and maybe a bit terse/confusing).
My question is... How was Git designed? Just using it for a short amount of time, you get the feel t... |
I recently came across the following code (from liferay.js) when I was working with Liferay:
....
if (!Liferay._ajaxOld) {
Liferay._ajaxOld = jQuery.ajax;
}
if (Liferay._ajaxOld) {
jQuery.ajax = function(options) {
if (Liferay.Util) {
options.url = Liferay.Util.getURLWithSessionId(options.u... |
I'm not new to programming and I've even worked with some low level C and ASM on AVR, but I really can't get my head around a larger-scale embedded C project.
Being degenerated by the Ruby's philosophy of TDD/BDD, I'm unable to understand how people write and test code like this. I'm not saying it's a bad code, I just ... |
I am taking the Stanford Online Machine Learning class which is outstanding. http://ml-class.org
Is anyone taking the Stanford Online Database class: http://www.db-class.org? Does it seem useful if you have a few years of fairly simple database experience, but no formal education in the area? Or is it mostly academic a... |
Is it fine to code PHP on Windows and host it later on a server running Linux? Can there be any problems in the migration of such a project?
I would think that there really can't be any problems, especially since I am a beginner in PHP and I won't use any of the advanced functions that may be OS-specific. However, I wo... |
Recently I started releasing an open source project, while I was the only user of the library I did not care about the names, but know I want to assign clever names to each methods to make it easier to learn, but I also need to use concise names so they are easy to write as well.
I was thinking about some guidelines ab... |
I'm interested in whether ActiveRecord pattern, made famous from Ruby on Rails, encourages or discourages the use of SOLID design principles.
For example, it seems to me that ActiveRecord objects both contain domain logic, and persistence logic, which is a violation of Single Responsibility.
|
As I was reading Martin Fowler's famous blog post Is Design Dead?, one of the striking impressions I got is that given the fact that in Agile Methodology and Extreme Programming, the design as well as programming is evolutionary, there are always points where things need to get refactored.
It may be possible that when... |
I asked a question here on programmers yesterday about learning HTML & CSS and the community was pretty generous to provide great answers. One of the answers was given by Emmad Kareem and that was : "if you can't do HTML, don't give up. Consider using Silverlight".
This answer made me visit Silverlight.net and I came ... |
I'm working on a small side project using CGI and Python (scalability is not an issue and it needs to be a VERY simple system.)
I was thinking of implementing authentication using cookies, and was wondering if there were any established best practices.
When the user successfully authenticates, I want to use cookies to ... |
I want to know if the service test classes should use real DAO objects and connect to the database or it should use mock objects to test only the business logic it do?
|
The definition for directed acyclic graph is this: "there is no way to start at some vertex v and follow a sequence of edges that eventually loops back to v again."
So far so good, but I am trying to find some premises that will be simpler to test and that will also guarantee the graph is acyclic. I came up with those ... |
I find it hard to describe this problem in words, which is why I made a video (45 seconds) to illustrate it. Here's a preview of the questions, please have a look at it on Vimeo: http://vimeo.com/epologee/perfect-crossfade
The issue of creating a flawless crossfade or dissolve of two images or shapes has been recurrin... |
I'm currently starting a new sub project where I will:
Retrieve the order information from our mainframe
Save the order information to our web-apps' database
Send the order as EDI (either D01b or D93a)
Receive the order response, despatch advice and invoice messages
Do all kinds of fun things with the resulting datase... |
I've been thinking about interview questions lately and I've been reflecting on bad interview experiences I've had in the past. One of particular note is where I had asked the interviewer why the team chose to use EJB 3 over Spring in their product. The interviewer pretty much tore my face off, yelling "Because Spring ... |
I've developed a website using PHP but I implemented it on Windows OS and hosted it on Windows server.
I just searched the PHP job market to know the on-going technology requirement and to keep my knowledge up-to-date accordingly with the job market.
I see more are asking for LAMP stack. I understand the sort of s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.