instruction stringlengths 34 19.9k |
|---|
Of the three
BufferedReader/Writer
Binary Streams
Channels
which is more preferred in real life for file I/O in Java and why?
I prefer channels for binary data to be put into file or read from and BufferedReader/Writer for String data
|
http://www.dartlang.org/
I've checked out the site very briefly, and got curious. Is there any advantages of using Dart? Is it just a replacement for JavaScript?
It looks like simpler Java. Writing quite a lot of C# at work, the language feels very much like what I'm used to, so learning the syntax looks like a breeze... |
I'm developing a software that contain many modules/Daemon running in parallel manner, what i'm looking for is how to implement that, i cannot use Thread because some of those modules/Daemon are perhaps implemented in other languages (C,java,C#...).
For example I'm using C for Hooking Messages exchanged between Windows... |
I have recently seen a .NET MVC solution in which the markup in the .aspx views which appear to have a Controller as their model i.e the controller seems to be providing the data for the view, and the .ascx user controls they contain use a separate model. I'm new to MVC and I wanted to find out about a few things I'm n... |
I've been programming professionally in C, and only C, for around 10 years in a variety of roles.
As would be normal to expect, I understand the idioms of the language fairly well and beyond that also some of the design nuances - which APIs to make public, who calls what, who does what, what is supposed to reentrant an... |
Introduction
Preamble
I was hesitant to post this, since it's an application whose intricate details are defined elsewhere, and answers may not be helpful to others. Within the past few weeks (I was actually going to write a blog post about this after I finished) I've discovered that the barrier I'm encountering is one... |
In several of my programming courses in the University, my teachers always told me the following:
A function and a procedure are basically the same thing: the only difference is that a function returns a value, and the procedure doesn't.
That means that this:
function sum($a, $b) {
return $a + $b;
}
... is a fun... |
Having e.g. a system for booking flights, during UAT it is not being tested by real users (customers who will buy tickets) rather than people from the client side who will just simulate this. Are there any more specific terms to distinquish between real users (like end user) and users doing the UAT?
|
What practices do you apply when working with large teams on multiple versions of a software or multiple competing projects? What are best practices that can be used to still get the right things done first?
Is there information available how big IT companies do development and management of some of their large project... |
I am a software developer having an experience of 3 yrs. I want to play with latest technologies always. But this is not practical. Because say, I developed a web application in .Net 3.5, now its 30% done. After the release of .Net 4.0, my mind is always goes with .Net 4.0. I think like this, lot of features are in new... |
I get confused when people try to make a distinction between compiled languages and managed languages. From experience, I understand that most consider compiled languages to be C,C++ while managed languages are Java,C# (There are obviously more, but these are just few examples). But what exactly is the core difference ... |
Thomas Erl defines SOA as follows in his site:
Service-oriented computing represents a new generation distributed
computing platform. As such, it encompasses many things, including its
own design paradigm and design principles, design pattern catalogs,
pattern languages, a distinct architectural model, and related
con... |
We are starting a new project and implementing on our corporations's instantiation of an openstack cloud (see http://www.openstack.org/). The project is security tooling for our corporation. We currently run many hundreds of dedicated servers for security tools and are moving them to our corporations instantiation of o... |
I think the title "Method flags as arguments or as member variables?" may be suboptimal, but as I'm missing any better terminology atm., here goes:
I'm currently trying to get my head around the problem of whether flags for a given class (private) method should be passed as function arguments or via member variable and... |
What's the difference between overloading a method and overriding it in Java?
Is there a difference in method signature, access specifier, return type, etc.?
|
Having read a lot about this topic --- such as on this Software Testing Fundamentals site on verification and validation and Software Testing and Quality Assurance: Theory and Practice by Naik and Tripathy --- I still do not get it. Verification should prove that you are building the product right, while validation pro... |
I took the example from this question modified a bit:
What is the point of the prototype method?
function employee(name,jobtitle,born)
{
this.name=name;
this.jobtitle=jobtitle;
this.born=born;
this.status="single"
}
employee.prototype.salary=10000000;
var fred=new employee("Fred Flintstone","Caveman",1970);
console.lo... |
Should a child window have it's own data context (View-Model) or use the data context of the parent? More broadly, should each View have its own View-Model? Are there are any rules to guide making that decision? What if the various View-Models will be accessing the same Model?
I haven't been able to find any consi... |
Disclaimer: The intent of this question isn't to discern what is better for the individual developer, but for the system as a whole.
I've worked in environments where small teams managed certain areas. For example, there would be a small team for every one of these functions:
UI
Framework code
Business/application log... |
Context: I'm taking several classes this semester in which I'll be coding. Here is a list of possible languages I'll be using:
Java
C (system and embedded level)
C++ (contest programming)
VHDL (for FPGA work)
Python
Scheme
Is it possible to keep all these languages floating around in one's head? How can one code with... |
My boss wants to recruit testers based on their testing efficiency (number of bugs identified). So, he's shortlisted 5 people and I need to give them an app full of bugs and see how they fare in reporting obvious bugs, and hidden bugs. I know.... it kind of sounds weird. I guess, this is just like the coding world, whe... |
There are two scenarios: writing and reading
Writing:
Whenever I write something to the ByteBuffer by calling its put(byte[]) method the position variable is incremented as: current position + size of byte[] and limit stays at the max.
If, however, I put the data in a view buffer then I will have to, manually, calculat... |
I work in a company going through a downsizing process. It is assumed that a lot of "let go" developers jobs will eventually be outsourced. Some of those programmers had some design to do.
Is it possible to outsource both design and creation/coding properly? I feel that by outsourcing design, we lose any in-house capab... |
It's like this mythical thing that a dominating portion of developers say is just the best option for back-end development, a part of development about which I know virtually nothing beyond the absolute basics.
So I've looked up PHP tutorials a bunch of times, trying to figure out why it's so powerful and common, but i... |
Yesterday my question How come verification does not include actual testing? created a lot of controversy, yet did not reveal the answer for related and very important question: does black box functional testing done by testers belong to verification or validation?
ISO 12207:12208 here mentiones testing explicitly onl... |
My Selenium test structures goes as -
Data Object class -
public class RegistrationData {
String firstName = "test first name";
String lastName = "test last name";
// Getter Setter Here
}
Page Object class which carries out operations on a Web Page -
public class RegistrationPage {
private RegistrationData... |
I switched to C++ a few months ago, learning its syntax, the main features
of the STL and what you can usually find in a "learn C++" manual.
Now I would like to go further. What would be your recommendations? I would like to know what to learn next (not only about the language, but also debugging, frameworks etc. etc.)... |
Can anyone suggest me a Common Name for Edit,Save,Delete,Select
I want to create a Interface in C#, which will support all these methods.
My Context is :
I am developing an Invoice Application in which i need a Product to be Created,Deleted,Updated,Selected
|
I am reviewing a proposed OO software architecture that looks like this:
Base
Foo
Something
Bar
SomethingElse
Where Base is a static class.
My immediate thought was that every object in any class will inherit all the methods in Base which would create a large object. Could this cause problems for a large syste... |
I recently started to use c# to interface with a database, and there was one part of the process that appeared odd to me. When creating a SqlCommand, the method I was lead to took the form:
SqlCommand myCommand = new SqlCommand("Command String", myConnection);
Coming from a Java background, I was expecting something m... |
After using version control tools, it is no longer necessary to comment out old code.
However, some team members still comment out old code. Therefore, I want to clean them up.
I want to mark commented lines which are really comments / documentation, so that every time I do not need to re-read all commented regions. Th... |
To be interchangable and testable, normally services with logic needs to have interface, e.g.
public class FooService: IFooService
{ ... }
Design-wise, I agree with this, but one of the things that bothers me with this approach is that for one service you will need to declare two things (the class and the interface),... |
I have only used Java Channels and BufferedOutputStream and the input counter part for reading and writing simple integers and some strings here and there to the file.
However I do not understand the use of all these classes when there is java.util.Scanner class that provides easy ways to read and write to the files.
J... |
Recently I stumbled once again on the issues of Haskell's records, in particular the uniqueness of field names. (It's a pain...)
I already read A proposal for records in Haskell from SPJ and Greg Morrisett, but its last update was in 2003.
Another paper called Lightweight Extensible Records for Haskell from SPJ and Mar... |
I have to create a word document in a specific format and send it as attachment to some email addresses.
I have a preview screen for the report which on approval has to be send in email. This is an ASP.NET MVC 3 application.
I am left with a few options here.
I am creating the preview using html. I can convert this ht... |
So, I graduated with a BSBA in Management Information Systems with honors almost 2 years ago which is more of a business degree. As of right now, I do have a job title of "Programmer", but it's more of a report writing position in an arbitrary, proprietary language called PowerOn with the occasional interesting projec... |
How are operators organized/saved in the memory in context of a programming language. Are they procedures/functions saved somewhere and compilers just manipulate things to call these procs whenever the operators are used in the program?
|
I have come across many situations where I had to build a system for a library or a clinic or other popular domains.
The thing is a domain model for a library was probably done 1000 times already with different level of details of course. Here is an example.
Is there a popular website or community where one can find re... |
I'm creating a News Reader app for Tablets and PCs. My app is fetching data from news sources by RSS feed of websites (in the server-side).
But some of these sites are showing some advertising banners at the end of each article.
Should I remove those banners from the feed? Am I legally/ethically allowed to do this?
And... |
I have been programming in PHP for several years and have, in the past, adopted methods of my own to handle data within my applications.
I have built my own MVC, in the past, and have a reasonable understanding of OOP within php but I know my implementation needs some serious work.
In the past I have used an is-a relat... |
I have written a small Java Swing desktop application. It seems like a natural step to port it to Android since I am interested in learning how to program for that platform. I believe that I can reuse some of my existing code base. (Of course, exactly how much reuse I can get out of it will only be determined as I star... |
Name's Vlad and I am currently on my third year of Community College, studying Computer Science with emphasis on Programming in C++ and Networking. I have completed a few programming courses with general ease, but have not gained advanced understanding of programming through school. None of my friends are serious progr... |
I work on a program with about 50 DLLs that are loaded from one executable, it's an old organically grown program where the only rationale for creating a new DLL is that one previously didn't exist to fill a given need. (and namespaces didn't exist in Delphi so it never crossed our mind to make dll1.main.pas, dll2.main... |
After 1 months research I basically give up on getting all URL's from a search results programmatically,
I looked at Google Search API to find a way to get millions of search results "URL's" to be specific to a text file or something relative but no success, but I am 100% there must be a way or trick of doing it.
Real ... |
Back when I started programming in college, a friend encouraged me to use the prefix incrementation operator ++i instead of the postfix i++, citing that there was a slight chance of better performance with no real chance of a downside. I realize this is true in C++, and it's become a general habit that I continue to do... |
I work for a small development company, 20 people total in the entire company, 3 in actual development, and we've adopted CD for our commits to trunk, and it works great, from a code management and up-time side. However - we're getting flak from our support staff and marketing department that they don't feel that they... |
The background:
I need to build a desktop application with some operations (CRUD and more) (=winforms), I need to make another application which will re-use some of the functions of the main application (=webforms). I'm using service layer for reusing my functions. The service is calling the functions on the BL layer (... |
My problem is kind of weird so please bear with me.
I have been working in a start up concerned basically with mobile development since my graduation 2 years ago. I develop apps for iOS but it's not really relevant. The start up structure is simply founders > developers, with no middle-tier technical supervision or pro... |
If I want to recommend a technology/plugin/library to my company for use in a project, are there any methodologies I can use that will produce more reliable results and a more convincing presentation of said results than just my own "common sense" approach?
|
I can't think of a better place among SO siblings to pose such a question. Originally I wanted to ask "Is python a pure OO language?" but considering troubles and some sort of discomfort people experience while trying to define the term I decided to start with obtaining a clear definition for the term itself.
It would... |
Please share your knowledge about these Crystal Reports concepts.
I want to know what is difference in section and sub report? I know about default sections and we can add new sections into report.
What is purpose of a subreport? when should we use a subreport instead of a section?
Where should we use multiple detail ... |
I know this is a dumb question and it might not be "conceptual" but, as a self-starter I really want to know how to get connected to some sort of "commercial database"?
I'm designing a local gas station utility app for iphone and ipad. I have absolutely no clue how to find a relevant database. For example, if I want to... |
I have a proof of concept application that uses Azure tables to associate DNA sequences to "something".
Table 1 is the master table. It uniquely lists every DNA sequence. The PK is a load balanced hash of the RK. The RK is the unique encoded value of the DNA sequence.
Additional tables are created per subject. The ... |
I have just started working in Information Security World. I want to learn the Python language for creating my own automated tool for Fuzzing, SQL-Injection etc.
My question is I don't know much about C language (only basic knowledge) but I want to learn directly Python Language so is it good?
I have seen there is lots... |
Doing a lot of reading about V&V, I would need to clarify the following.
A lot of definitions (less formal ones found in books) define verification like that:
Verification: The software should conform to its specification.
But then they speak about requirement verification, design verification etc. If I say that these ... |
In the project/team I'm working the frequency of comments is a little low.
One reason might be that it is not clear to the long-time devs what lines in the code really needs a comment (each part of the project has quite fixed devs).
To increase this we plan to let team members review the code and check in "requests for... |
I have been noticing for a long time on Stack Overflow that most users recommend to use PDO instead of mysql_*, because PDO is more secure than mysql_*. But my question is if websites which are already running with mysql_* will stops working? Or what exactly does "deprecating" mean here? So should we have never used m... |
I am working on an application that has many functional parts.
When a customer buys the application, he buys the standard functionality, but he can also buy some additional elements of the application for an additional price.
All of the elements are part of the same application executable.
A license key is used to indi... |
When an API requires that a client authenticates to it, i've seen two different scenarios used and I am wondering which case I should use for my situation.
Example 1. An API is offered by a company to allow third parties to authenticate with a token and secret using HTTP Basic.
Example 2. An API accepts a username and ... |
For the past 6 months or more, I've been seeing many codes hosted at sourceforge.net as well as other hosting sites "Move to GitHub". A mere Google Search with the phrase "Moved to Github" returns several results containing the text moved to github. This is very confusing for me, and I'm wondering, why exactly are peop... |
I am currently writing my Master's Thesis on maintainability of a web application. I found some methods like the "Maintainability Index" by Coleman et.al. or the "Software Maintainability Index" by Muthanna et.al.
For both of them one needs to calculate the cyclomatic complexity. So my question is:
Is it possible to me... |
I am developing a asp.net website. When I used the CSS property "word-wrap", VIsual Studio 2010 is showing a warning: Validation (CSS 2.1) 'word-wrap' is not a known CSS property name.
When I tested the website, it is working fine. However, can there be any issue in using this property ignoring the warning?
|
I'm working on a data migration of several hundred nodes from a Drupal 6 to a Drupal 7 site. I've got the data exported to the new site and I want to check it. Harkening back to my statistics classes, I recall that there is some way to figure out a random number of nodes to check to give me some percentage of confidenc... |
I'm not talking about MySQL, I'm talking about Microsoft SQL Server
I've been aware of PDO for quite some time now, standard mysql functions are dangerous and should be avoided.
http://php.net/manual/en/function.mysql-connect.php
But what about the MSSQL function in PHP? They are, for most purposes, identical sets of ... |
I have an idea for a personal iOS project that I would like to write and release to the iOS store. I'm the type of developer who enjoys developing and publishing. I want to write quality software and take care of my customers. Assuming that I wrote an application that had reasonable success, there is a fair chance t... |
Assuming there is some bit of code that reads files for multiple consumers, and the files are of any arbitrary size: At what size does it become more efficient to read the file asynchronously? Or to put it another way, how small must a file be for it to be faster just to read it synchronously?
I've noticed (and perhaps... |
I have a problem related to this:
Are there guidelines on how many parameters a function should accept?
In my case, I have a function that describes a rounded rectangle. The caller specifies
An integer which determines how the rectangle should be merged into previously created shapes
An Anchor, which is a point that i... |
I have only a limited knowledge of Lisp (trying to learn a bit in my free time) but as far as I understand Lisp macros allow to introduce new language constructs and syntax by describing them in Lisp itself. This means that a new construct can be added as a library, without changing the Lisp compiler / interpreter.
Thi... |
I need some expert answers to help me determine the most efficient algorithm in this scenario.
Consider the following data structures:
type B { A parent; }
type A {
set<B> children;
integer minimumChildrenAllowed;
integer maximumChildrenAllowed;
}
I have a situation where I need to fetch all the orphan child... |
Perl doesn't support a friend relationship between objects, nor does it support private or protected methods. What is usually done for private methods is to prefix the name with an underscore. I occasionally have methods that I think of as friend methods. Meaning that I expect them to be used by a specific object, or a... |
So I have a Selenium Automation project (using Maven).
I'd like to be able to set my tests to run overnight and possibly email a report daily to the team.
Which CI would be most suitable for TestNG.xml suites?
I tried Hudson but I couldn't figure out a way to execute TestNG files from the build?
Thanks in advance.
|
I have a factory class XFactory that creates objects of class X. Instances of X are very large, so the main purpose of the factory is to cache them, as transparently to the client code as possible. Objects of class X are immutable, so the following code seems reasonable:
# module xfactory.py
import x
class XFactory:
... |
I've noticed that July 26th (my birthday) is used really often in various PHP examples related to preventing http caching using Expires header, like:
https://stackoverflow.com/questions/12398714/cache-issue-with-private-networking-stream
https://stackoverflow.com/questions/2833305/how-to-expire-page-in-php-when-user-lo... |
I am thinking to take the next semester a course called "Digital systems architecture", and I know that we need to program micro-controllers with several programming languages such as C, C++, verilog, and VHDL. I want to be prepared to take that course, but I need to know if I need to study deeper these languages.
At ... |
In Spring AOP, I can add an aspect at the following locations
before a method executes (using MethodBeforeAdvice)
after a method executes (using AfterReturningAdvice)
around a method (both before and after a method executes) (using MethodInterceptor)
If I have all three types of advice, is the order of execution alwa... |
So, how exactly do software patches work. If there is a certain bug in the source code of a program, how is this source code changed when one installs a patch? After the patch has been installed how is the program 'automatically' rebuilt?
|
I've started using Google Drive for my cloud needs and backing up pretty much everything. I've got the app installed so it auto-sync's all my content in most things.
My question is this, I am currently coding for iOS (although this applies to any coding project) and am split on storing my project files on Google Drive... |
For example, should I be doing something like:
<?php
function output_message($message,$type='success') {
?>
<p class="<?php echo $type; ?>"><?php echo $message; ?></p>
<?php
}
output_message('There were some errors processing your request','error');
?>
or
<?php
function output_message($message,$type='success') {... |
I agree that we should put CRUD methods in a data access layer, However, in my current project I have some issues.
It is a legacy system, and there are quite a lot CRUD methods in some concrete manager classes.
People including me seem to just add new methods to it, rather than reuse the existing methods.
Because
We d... |
I am currently building a test plan for the system I am working on. The plan is 5,000 lines long and about 10 years old. The structure is like this:
1. test title
precondition: some W needs to be set up, X needs to be completed
action: do some Y
postcondition: message saying Z is displayed
2. ...
What is th... |
This is more of a "how would you do it" type of question.
The application I'm working on is an ASP.NET MVC4 app using Razor syntax.
I've got a nice domain model which has a few polymorphic classes, awesome to work with in the code, but I have a few questions regarding the MVC front-end.
Views are easy to build for norm... |
I'm a little bit confused about BDD. I'm doing TDD currently.
My question is whether BDD is complementary to TDD or it's a whole new thing and my team should do both TDD and BDD? Or is it enough to do just one or the other?
|
My company has many clients wanting mobile applications and having the payments come into our account and then sorting the payments would be a real pain.
So can a company have a main account to publish applications (free and chargeable) and still have some sort of client account for each app (so they could view sales a... |
I'm a programmer that also does database stuff and I get a lot of so-called one-time report requests and recurring report requests.
I work at a company that has a SQL Server database that we integrate third-party data with and we also have some third-party vendors that we have to use their proprietary reporting system... |
I'm currently developing an client-server application in node.js, Express, mustache and MySQL. However, I believe this question should be mostly language and framework agnostic.
This is the first time I'm doing a real MVC application and I'm having trouble deciding exactly what means each component.
(I've done web appl... |
I run a small company composed of only 2 developers. We are building a very big application for one of our clients. Development on this project has gone on for 1.5 years.
Now this client has secured an important sponsorship, and they are organizing events related to this project. So now we have a deadline in 2 months a... |
I am a developer and have worked at this company 4~5 years by now.
We have been practicing scrum for about 2 years.
I think, I have been worked well with QAs.
I believe QAs/developers/technical writers are all one team.
We are also actively hiring new team members.
As a legacy member of the team, I have faced to assist... |
This question brought me to another question: is there any VCS/tool for a VCS which automatically backups your source code between the last checkout and current changes?
I had the problem of loosing uncommited source code changes just one week ago.
I did not want to commit yet because the changes were incomplete. But t... |
I've been doing software for a long time, but almost all of it has been back-end centric.
I recently decided to learn Swing and tried to apply MVC principles. I realize that in Swing the View is handled for you by the components you add to the window/frame/panel, and the Controller is your code responding to the event... |
In C++, pointers generally have a lot more functionality associated with them than is really necessary. A class template that wraps a pointer and removes most of the less-used features (arithmetic, indexing, deletion). Each function could then decide how powerful a pointer it requires and take the appropriate type.
W... |
My development team is looking to expand into some new areas that we don't currently have direct skills for. We're trying to evaluate the available training courses, but there's not much depth of differences that you can plumb from a webpage or two and a brochure. So the root of my question is what should we be looki... |
For some systems, the time value 9999-12-31 is used as the "end of time" as the end of the time that the computer can calculate. But what if it changes? Wouldn't it be better to define this time as a builtin variable?
In C and other programming languages there usually is a variable such as MAX_INT or similar to get the... |
We develop small to large visualization projects for different tasks and industries and sometimes while rewriting them a couple of times in the process we hit walls because we discover that we need to add a lot of code to support new requirements. Now we have established a design process that seems to work well (at lea... |
What are the advantages of Weblogic or Websphere over Glassfish or JBoss, since they may reach costs of millions of dollars?
Edit: Is there additional functionality? The all are Java EE Full Certified.
The question is about technology, not business or marketing. From the technological POV how are the servers different?... |
I was talking to a technical boss yesterday. Its about a project in C++ that depends on opencv and he wanted to include a specific opencv version into the svn and keep using this version ignoring any updates which I disagreed with.We had a heated discussion about that.
His arguments:
Everything has to be delivered in... |
I'm learning to develop windows applications using WINAPI and plain C.
Now I got a bit confused with all those handles and would like to ask if you guys could teach me some good practices to structure and handle controls and windows.
Here's where I get confused:
Using the IDs declared in the resources for each object, ... |
I have just read this blog post from Jimmy Bogard and was drawn to this comment.
Where this falls down is when a component doesn’t support a given
layering/architecture. But even with NHibernate, I just use the
ISession directly in the controller action these days. Why make things
complicated?
I then commented ... |
I am new to requirements analysis and have a simple questions: Would you include the budget in the requirements, if e. g. the departments budget for running costs is 10k a year.
|
What is the best practice for packaging Java enums?
is it separate file for each enum?
or
having same file for all the enums?
What are the pros and cons ?
|
I have been programming for a couple of years and have often found myself at a dilemma.
There are two solutions -
one is simple one i.e. simple approach, easier to understand and maintain. It involves some redundancy, some extra work (extra IO, extra processing) and therefore is not the most optimal solution.
but... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.