instruction stringlengths 34 19.9k |
|---|
So, I'm not a programmer, though I've been writing code all of my life. As is my habit, I attempt to contact well know experts in almost any domain I find of interest, and interestingly, I get a lot of meetings, which I value a great deal.
So, here's the deal -- a meeting has been set for me to meet a very well known ... |
Loosely coupled classes gives flexibility. If I understand it right, Event flow, Observer Pattern and Design Patterns like MVC focus on loose coupling. So in this context I am aiming towards making a project where all the classes are loosely coupled.
So, for example I have a class A that uses B:
then instead of a.b.... |
When setting up a continous integration environment, does it always entail having the build server pull code and merge between branches?
Or is it something you NEVER want to do because you are depending on an automatic merge would usually ends up having issues (and requires manual intervention).
|
I worked with JPA (Eclipselink implementation) and Hibernate. As I understand these two have great caching systems.
I am interested in caching in a Web application and in order to better understand the process I'm trying to implement something on my own.
Sadly, I cannot find any in depth documentation about this subje... |
I am managing a team of 6 people that recently moved to Scrum.
We have a Scrum Master (one of the developers in the team) and a Product Owner.
Since I have quite a lot of free time (because a lot of management work that I used to do is now done by the Scrum Master and Product Owner), and since I want to remain technica... |
We use Jenkins to run continuous integration builds. The output of these builds might be EAR files, WAR files, or just a collection of files that are TAR'd up.
To this point we have used Jenkins to manage the produced artifacts.
We have Artifactory deployed in-house. Would it be a bad idea to leverage Artifactory to ... |
I would like to publish a website for certain family members only. Simply put, like a mishmash of family photos and videos. I want it to remain private, however.
I was considering using openid for the login process because I really wanted to avoid:
Storing Usernames and Passwords
(Too much maintainance)
Making a obfus... |
Think of the question as a family tree, in the PS section I will explain what exactly it is but family tree is easier to imagine: so father, has kids, those kids may have more kids, those kids may have more kids, etc..
1- I don't have the whole information in memory to traverse them. With each method call and hitting ... |
Ok more of a conceptual question here:
Say I have an existing record of type Meeting. When I go to edit the meeting I have a listbox with all current meeting participants, and one with all employees. I then add a few employees from the master list and remove a couple from the meeting list. What is then the best approac... |
Let's say I have a repository of functions. These functions work with business objects within a database, CMS or other third party API. For example, my repository interacts with virtual files and documents in a document management system. I want to be able to implement a simulation mode in my repository such that when ... |
We're implementing a Scrum workflow and I'm trying to wrap my head around user stories, when they're completed, iterations, etc. One thing we often do is work on a story during an early iteration, get it fully working but "ugly". We use plain buttons, no images, just the text to show that it's working the way they shou... |
I'm wondering about the appropriateness of URL parameters in RESTful resource creation.
First, here's some context. I'm working on an API that will remotely update the software on embedded devices connected to an online device cloud. The basic workflow is:
Discover available updates
Apply desired updates
Monitor updat... |
On reading the joel test and about daily builds, a discussion with a few tech-lead friends of mine in various companies revealed that they never did daily builds or continuous integration because according to them:
Daily builds were meant for projects following Agile practices. It does not work for the waterfall mod... |
How can we handle multiple instances of a method through a single class instance(Single constructor call)?
To elaborate, I have a handler class which has two methods lets say verifyUser(String JSON) and getUserInfo(String JSON). Assuming that there are many users accessing this methods, there will be multiple instances... |
I read and studied a lot of computer science and engineering and I rarely or never seen a book about debugging or a theory how to debug (though I surely developed some debugging theories of my own).
Are there any debugging theories and/or books? Why / why not? I can read how to debug using gdb and some of the most usef... |
I'm working on a ground up code generator project, but I feel I might be reinventing the wheel.
Does anyone know where I can find some best practices guidelines or design patterns for code generation?
|
I know that .Net provides the feature to mix several languages within the same application (there are some constraints of course, but this is not essential). Theoretically, this might be done because the languages supported by .Net do not fully expose all the features it can provide. IL does of course. So when you need... |
What tools exist to facilitate pair programming with Visual Studio when the programmers are not in the same physical location? At the moment we are thinking voice (Skype?) plus remote desktop (VNC? TeamViewer?), but it would be good to know of other suggestions and experiences. Also, is there anything more integrated w... |
I'm creating a video player, like a custom YouTube player.
All of the GUI elements (progress bar, video player, play button, ...) are different classes, but I obviously need them to communicate. When the progress bar is clicked, or the slider is moved, it needs to send a "seek(x)" command to the video player. Similarly... |
I'm working on a large software project which is highly customized for various customers arround the world. This means that we have maybe 80% code which is common between the various customers, but also a lot of code which has to change from one customer to the other. In the past we did our development in separate repo... |
How can I avoid code duplication in unit tests?
Using Java and JUnit suppose I have something like this:
public interface Arithmetic<T> {
public T add(T a, T b);
public T sub(T a, T b);
}
public void IntegerArithmetic<Integer> {
//
}
public void DoubleArithmetic<Double> {
//
}
And the test class:
pub... |
Predicate: I'm brand new to BDD / TDD, but I've done my homework.
I'm trying to put everything I've read / learned into practice with VS2010, SpecFlow and NUnit. Things are working, but it's quickly becoming a chicken / egg scenario within a blur of unit and acceptance tests. I hope solving these BASIC questions will m... |
Is it possible to use hash function but with File instead of Array, and it's gonna be saving the record in a file position and then search will fseek to that position, but I'm not sure how to open a file with let's say 1000 line, do you think that method could work?
|
They both seem to take about the same amount of effort to use:
Singleton: needs a .h and .m file, has to be imported into any class you want to call it from and then has to be instantiated
How is that any different than a class?
|
My first main language was Java. However, over the years I've dropped Java in favor for Python, JavaScript, bash, etc. I still have advanced reading knowledge of Java, but since I haven't coded in it for so long, my writing knowledge is intermediate at most. The other day, while looking at some old code written in J... |
I am an independent contractor and, as such, I interview 3-4 times a year for new gigs. I am in the midst of that cycle now and got turned down for an opportunity even though I felt like the interview went well. The same thing has happened to me a couple of times this year.
Now, I am not a perfect guy and I don't exp... |
I'm looking for experiences regarding the ordering of the subject and modifiers in variable names.
A simple object Shape would have just a subject for the variable name, such as Area.
A slightly more complex case Sphere which has a wall will have an inner volume and an outer volume, which is where my question comes int... |
Let's say you write a program that, when started, reads its configuration file to know which modules to start-up etc. If that configuration file is missing, an error will probably show up. This is an important situation that must always be handled.
I read a statistic once which said that about 70 % of the code in a typ... |
I am building an application that will be modular, in a way that it will be a set of separate systems communicating with each other. It uses Hadoop on all systems, and HBase on 3 of the 4.
Scaling will only be an issue on the non Hbase system, it uses it's own NoSQL like system. It will be a client facing system, and ... |
I'm new to the functional programming concepts in C#, but I have some experience with higher order functions via Haskell, Scala, Python and Ruby. I'm currently going through an old .NET 2.0 codebase with a LOT of duplication in it. Most of it is simple "copy/paste" with a few variables changed. I'm trying to condense a... |
I would like to start getting more contracts in the mobile, smart-device, and console development space and, having little prior work experience in the field, I need to build a portfolio of example projects.
Most of my professional experience is based on the .NET stack, so that is helpful in covering Windows Phone, Win... |
Sometimes objects just need to be tightly coupled. For example, a CsvFile class will probably need to work tightly with the CsvRecord class (or ICsvRecord interface).
However from what I learned in the past, one of test-driven development's main tenets is "Never test more than one class at a time." Meaning you should u... |
I've worked in several contracts where the client used Cucumber and I've often felt that the testing suite didn't really have a place in our stack.
From what I understand, business analysts/non-technical coworkers write up the tests and the developers make the step definitions work. My problem with this approach is th... |
Do you need to buy a run time license from Sencha if your application code written is developed in Ext JS and deployed on a web server?
http://www.sencha.com
|
I typically try and avoid bidirectional relationships at all costs. Recently I've been trying to follow a more domain centric design philosophy and I'm looking for advice in the best way to solve a specific problem.
I am implementing a basic 2d grid. There are 3 basic classes, Item, Tile (has a list of Items), and Wo... |
I'm in the process of setting up a GitHub account with the plan of making a pair of libraries I developed as parts of some recent iOS projects freely available for other iOS devs to use.
I don't currently have off-site backup for most of my code, so as part of this, I originally thought I would upload all of my persona... |
[edit#2] If anyone from VMWare can hit me up with a copy of VMWare Fusion, I'd be more than happy to do the same as a VirtualBox vs VMWare comparison. Somehow I suspect the VMWare hypervisor will be better tuned for hyperthreading (see my answer too)
I'm seeing something curious. As I increase the number of cores on my... |
Coming back to SQL Server after several years away, I find the Visual Studio Database projects (and now SSDT) very exciting, as they are aiming to offer a way to develop databases declaratively, rather than having to mess around with change scripts.
However, the elephant in the room is the 'data motions' (I'm not too s... |
I am student of 3rd year software engineering, and I find myself nowhere in field of programming.
I know basics of programming languages like C, C++, Java, Visual Basic, HTML, JAVAScript, CSS and PHP. But every time I sit in front of my computer and start coding in any of the languages, I feel frustrated and distracted... |
Are there some statistics out there that show the approx. number of users that popular programming languages have and the rate this number increases over time?
|
If I have a People table and those people can be at different addresses, and each address can have more than one person, thats a many-to-many relationship.
So, using ORMs like Entity Framework and Django, I've got the hang of doing that. But my problem is that there are different types of people, like employees and cus... |
Consider a case when I want to try some idea of an application. But I want to avoid investing a lot of effort in coding UI/work flows/database schema etc before I see that it's going to be useful to me (as example of potential user). My idea is stay lightweight and put all the data in text files. So the components coul... |
I have the option to install the Android SDK on Windows or OSX. Which platform provides a better (easier) development experience?
To keep this constructive, I'm looking for any difference that eliminates compatibility issues, ease of debugging, or compatibility with 3rd party utilities.
|
Suppose my favourite open source application has a bug. Now I want to contribute to the application by fixing its bug and submit the patch to the development team. What's the most effective way to do this? Do you actually read the whole source code of the project (or most of it) to understand the logic before start fix... |
It's possible to omit the terminating semicolon in a tag.
Example:
<table>
<th><td>Name</td><td>Email</td>
<? foreach ($receivers as $receiver): ?>
<tr>
<td><?= $receiver->name ?></td>
<td><?= $recevier->email ?></td>
</tr>
<? endforeach ?>
</table>
Note the <? endforeach ?> without a semicolon after... |
I am new to REST and am struggling to understand how one would properly design a REST system to both allow for loose coupling but at the same time allow a consumer of a REST API to understand the API.
If, in my client code, I issue a GET request for a resource and get back XML, how do I know what to do with that xml? ... |
I know of a potential customer that has been paying for website development work on an hourly basis for several years by several independent contractors, but has never signed an agreement as to terms or ownership for it. They just get a bill and pay it.
So, does this mean that there is implied ownership by the develop... |
I have searched Programmers and Stackoverflow and was not able to come up with a satisfying answer, even though I'm quite sure it must have been asked many times before. The only question I found has answers only dealing with readability. The code excerpts below are from actual C# code I was writing.
When dealing with... |
When you're in Python or Javascript, you should always put binary operators at the end of the previous line, in order to prevent newlines from terminating your code prematurely; it helps you catch errors.
But in C or C++, this isn't an issue, so I'm wondering:
Is there any reason for me to prefer the second version t... |
I have 6 years of programming experience, mostly following the object oriented paradigm, and I'm interested in learning functional programming. My main goal is to become a functional paradigm programmer and not a programmer who is using a functional language but still writes in imperative style.
When I'm practising in... |
Ever since entering the world of programming, I've been bombed with tips like "file should be only x lines", which is fair since new programmers tend to stuff everything into one file. But, having done programming professionally for more than a year now, I've mostly found myself getting hindered by the small size of th... |
I'm a self-taught programmer about to enter the job market. What I want to know is what is the best way to show my experience to employers?
What do employers want to know about my programming experience? Do employers want to look at code I wrote or could they want to see the software in action? Or do they only care how... |
I know what a Web API is.
I've written API's in multiple languages (including in MVC3).
I'm also well practiced in ASP.Net.
I just discovered that MVC4 has "Web API" and without going through the video examples I can't find a good explanation of what exactly it IS.
From my past experience, Microsoft technologies (espec... |
I am contemplating writing a programming language. Most grammars define expressions as being a kind of a statement. But really I cannot come up with a single example of any useful expression that would pass as a statement.
See https://stackoverflow.com/questions/19132/expression-versus-statement for an easy definition ... |
What does the => mean in Perl?
my $CreateArray = [
objectClass => [ "top", "person", "organizationalPerson", "inetOrgPerson" ],
cn => "Jane User",
uid => "0000001",
sn => "User",
mail => "JaneUser@mycompany.com"
];
produces
CreateArray:
0 'objectClass'
1 ARRAY(0x104ef40)
0 'top'
1 'person'
2 'organizational... |
Nowdays it turned into a bloated client that works in Mac, Linux, and Windows, while still keeping the whole program in a single binary file that weighs only 876 kb, while competitors that use gui libraries weigh around 6 mb.
Do they create a separate native gui for each platform instead of using a multiplatform gui li... |
I am relatively new to Haskell and I am trying to learn how different actions can be executed in sequence using the do notation.
In particular, I am writing a program to benchmark an algorithm (a function)
foo :: [String] -> [String]
To this purpose I would like to write a function like
import System.CPUTime
benchmar... |
(I imagine this would be a good interview question, but in my case it's more pragmatic than that.)
We have a large & complex application that models an extremely long and sophisticated chemical reaction process between dozens of chemical components. We are at the stage of designing Acceptance Tests for the application... |
A function produces this hash of arrays:
'KEYNAME1' => ARRAY(0x1edeeb0)
0 'val11'
1 'val12'
2 'val13'
'KEYNAME2' => ARRAY(0x1efacb8)
0 'val21'
1 'val22'
2 'val23'
Another function requires an array of hashes containing arrays:
0 HASH(0x1f6df98)
'KEYNAME1' => ARRAY(0x1f776b0)
0 'val11... |
It seems like there are many different styles to write JavaScript, in fact I've heard that JavaScript is an expressive language.
But the point of code is functionality (function) not expression (form).
Is there a library that will be adopted into the ECMA standard the way the STL and Boost Library were adopted in to th... |
I'm working as a junior programmer, and the senior programmer above me has instructed me to follow a certain unofficial policy for constructing new queries on our web development projects. Generally, we are developing an intranet site for some client, and they always have databases. He wants me to have a class containi... |
When debugging, I sometimes find that I make some changes and I am not 100% sure why those changes correct some bug in the program. Is it essential to understand every single detail about why some bugs were occurring and why certain changes eliminated those bugs? Or is it common among developers to sometimes get the pr... |
This video clip by NASA says that data from Curiosity relayed by the Mars Reconnaissance Orbiter (MRO) would be stored for a few hours, then transmitted to Earth (apparently taking about 14 minutes), after which it would take hours for engineers to decode the data.
From what I've read, it seems that the MRO can be used... |
We have a data layer that wraps Linq To SQL. In this datalayer we have this method (simplified)
int InsertReport(Report report)
{
db.Reports.InsertOnSubmit(report);
db.SubmitChanges();
return report.ID;
}
On submit changes, the report ID is updated with the value in the database which we then return.
Fro... |
We are looking for a version control tool. I personally think it's pretty cool to use Git. However, my boss recommends TFS. He told me it's much more secure to use an SQL Sever based tool, such as TFS and SourceAnywhere.
In addition, my boss also sent me a link.
My question is: Is it secure/strong enough to use Git or... |
I have a class that performs basic MySQL operations. This is all in PHP.
class dbTables {
public $name;
protected $fields = array(); // array of dbTableField objects
public $result_sets = array();
protected $primary_key; // filled using getFields() from __construct()
public function __construct($t... |
I have some huge classes of more than 2k lines of code (and growing) that I would like to refactor if possible, to have some more light and clean design.
The reason it is so big is mainly because these classes handle a set of maps that most methods need to access, and methods are very connected to each other.
I will gi... |
I recently finished my C++ programming class, and I'll start school in september. There is a limited online Parking spot registration and it always gets filled very quickly.
I would like to create a code that will quickly access the page and register for me.
The question is, how is this feasible? I guess I could use py... |
I am designing a system that will be running online under Microsoft Windows Azure. One component is a REST based web service which will really be a wrapper (using proxy pattern) which calls the REST web services of a business partner, which has to do with BLOB storage (note: we are not using azure storage). The majorit... |
Should I worry about the safety of my application if it runs in Full Trust level?
If yes, why? What damages could be done?
If the trust level should be a concern why it is the default level for asp.net applications instead of medium?
I know all the yes and no's between medium and full trust levels, but I can't see whe... |
What do you call classes without methods?
For example,
class A
{
public string something;
public int a;
}
Above is a class without any methods. Does this type of class have a special name?
|
One of the best/worst Microsoft software innovations (great for compatibility; terrible for efficiency) has been Windows' Side by Side Configuration. This allows, among other things, for different components of a program to have multiple versions of the C/C++ runtime libraries loaded into the same process.
This has alw... |
In an answer to this question (written by Pete) there are some considerations about OOP versus FP. In particular, it is suggested that FP languages are not very suitable for modelling (persistent) objects that have an identity and a mutable state.
I was wondering if this is true or, in other words, how one would model ... |
I'm sorry if this is a ABSOLUTELY sophomoric question, but I'm curious what the best practices are out there, and I can't seem to find a good answer on Google.
In Python, I usually use an empty class as a super-catchall data structure container (sort of like a JSON file), and add attributes along the way:
class DataObj... |
I'm not asking if EAV tables are good or bad. I'm wondering if they are considered "normalized", and if not, why? If they aren't normalized, which normal form are they violating and why?
|
My team of 4 experienced developers works on a large, modular Windows application (approx. 200 KLoC). I have focused on the core codebase since the beginning of the project (3 years ago) and have gradually shifted to a semi-lead developer position, though I am not the team manager.
Our current iteration is a high-prior... |
I've recently been reading through Mark Seemann's Dependency Injection in .NET and have been attempting to apply some of what I've learned in a new project I'm working on, and I'm stumped on a particular scenario trying to determine what dependencies I should and should not inject. I've read several other questions on ... |
How do you go about introducing the codebase, which may be rather complex and tangled with a lot of "gotchas," to a new member of your team?
I think the easiest way would be to have the overall architecture laid out with diagrams, and take a couple weeks (or months) giving the new person well defined (and well scoped) ... |
More and more I'm seeing functions being declared like
var foo = function() {
// things
};
Instead of how I had learned, like
function foo() {
// things
}
What's the difference? Better performance? Scope? Should I be using this method?
|
I'm a chess enthusiast and a programmer. I recently decided to start making a chess engine using my chess and programming knowledge. So here's my question:
What language (I'm familiar with Java, C++ and Python) and methodology should I adapt while writing a chess engine?
A little guidance would be much appreciated.
Edi... |
Like most modern developers I value Agile principals like customer collaboration and responding to change, but what happens when a product-owner (or whoever determines requirements and priorities) changes requirements and priorities too often? Like several times a day?
I recently inherited a smallish code base that was... |
In ASP.NET and C# I've ran across this before. Your class needs to implement interface ISomething in order for something in the super class to supply something to you.
I can't remember the details, as I ran across it quite a while ago, but it had something to do with session variables in ASP.NET C#. It was part of th... |
What exactly happens in Java when you instantiate the same object multiple times?
For example:
Test test = new Test();
then later on I will call it again, Test test = new Test(); again or inside a loop. Will the previous instantiation be disposed?
|
Go and D provide garbage collection, and yet they claim to be system programming languages. What degree of low-level programming can be achieved with languages having garbage collection?
For low-level programming, I mean close to the hardware or being able to:
Runs directly in limited memory, with no latency, and perf... |
In am reading Spring in Action (3rd edition) and here a snippet from it:
ApplicationContext ctx=new ClassPathXmlApplicationContext("springidol.xml");
Performer performer=(Performer)ctx.getBean("poeticDuke");
performer.perform();
It doesn't has any problem,however, when the author introduce the ... |
I have been working a while on a Django project which has been growing a bit lately. I have been think a bit about what strategy to use to make it easier to handle. One thing I would like to get some input on would be if I should split my application into several smaller applications. That would make my view and model ... |
It's easy to accept that objects should be used in all layers except a layer nominated as a data layer. However, it's just as easy to end-up with an 'anaemic domain model' that is just an object representation of data with no real functionality ( http://martinfowler.com/bliki/AnemicDomainModel.html ).
However, using ob... |
I am having a discussion on code style, and it's starting to sound like a "matter of taste". I strongly believe otherwise, so I'm writing this to get your opinion and learn from your arguments for and against.
The issue is that of hiding complexity by replacing a bunch of lines of code with a method. This discussion is... |
I'm working on an application, that does IP routing and QoS. Today we have the QoS implemented, with 3 priorities (low, normal and high) and for each level we create a Queue and as soon as the packages are queued, we send it forward in a FIFO way (the scheduler spend 60% of time with the high queue, 30% the time with n... |
Can website display issues on certain platforms affect a website's search rankings and potentially hinder any SEO efforts?
|
Currently I have three classes and respective interfaces and respective builders:
Tree: the data structure (implemented in SimpleTree)
ProbabilityTree: is a Tree with added functionality to randomly select child nodes and to adjust the probability of selecting a node (implemented in ProbabilityTreeImpl).
DynamicTree: ... |
In the Use case you need to make all the activities the user can do. And then in the Activity diagram I need to explain the Use cases, show the steps that it handles.
But if this is all correct, where do I need to show the enemies? Like: Generate path, walk, etc...
Because it isn't controlled by the player, the player... |
I've just started at a new job this past month and looks like they have NO source control for their code. They are relying on the backups their hosting provider takes for them.
After talking a bit I convinced my boss that we should definitely be using source control and after I gave a short seminar on it, the entire te... |
We elicit requirements from our product stakeholders by creating and refining user stories in monthly sprint planning meetings. This includes defining use cases, acceptance criteria, and identifying constraints, and the final result is a sprint backlog of user stories. The high-level customer requirements are refined... |
Simple question, what's more common / standard / won't make future developers look at me cross-eyed for unit testing:
Displaying just the errors, or reporting every passed test?
|
I am a developer in a good company. I was given a task by my company to accomplish within a week however I finished the same in 4 days, my boss, the client, and other team members all are happy by my work; even I was! However suddenly I got a thought in my mind: "For my work I took some code from internet and mixed it ... |
I've seen some people who make properties for every single member, private or not... does this make any sense?
private string mWhatever;
private string Whatever
{
get
{
return this.mWhatever;
}
set
{
this.mWhatever = value;
}
}
I could see it making sense in 1% of the cases a... |
My resume is no longer relevant. It can no longer contain an adequate description of my technical abilities. One can get a much better sense of what I am capable of by looking at my GitHub repositories, my Stack Exchange profiles, and the various courses that I am taking at Udacity and Coursera. The problem is that I h... |
Possible Duplicate:
How do I create my own programming language and a compiler for it
I want to create a new general purpose language that will compile to JavaScript and I'd like to be able to write it in that same JavaScript.
I wouldn't go much into detail about why, but how can I do it? Currently I have professiona... |
Every now and then I get or write some minimal code samples to achieve tasks. What's the usual practice for storing these samples (which could prove useful later on) ? Have a separate source folder or create a separate project ?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.