instruction
stringlengths
34
36.1k
Currently, I enjoy my Java 101 class. I have some ideas for apps that I'd like to make and with time and work I think the process of developing an application from the ground up will work out fine. When I get my Java app(s) up and running - will it be easy to find a place where I can offer them for sale? In the Enter...
Basically, I've learned so far that garbage collection erases forever any data structure that is not currently being pointed to. But this only checks the heap for such conditions. Why doesn't it also check the data section (globals, constants, etc etc) or the stack as well? What is it about the heap that it's the only ...
OK, I've learned what a static function is, but I still don't see why they are more useful than private member functions. This might be kind of a newb-ish question here, but why not just replace all private member functions with static functions instead?
Some background: My current job has be as the sole web developer for our company. I have been given responsibility for a number of external websites, as well as our internal intranet site. The external sites are currently hosted externally, and either created/maintained with a CMS, or custom designed by the external h...
Is freelancing in Android development or Web development the better choice to achieve a ~300$ income\month? It is too hard for me to do both. I'm currently studying CS in college and this is my second year. Financially, I'm 100% depending on my parents and this is really uncomfortable for me. My goal is to make at leas...
Recently I found a book, Purely Functional Data Structures and all the examples in this book are given in ML with Haskell versions in its appendix. But I only know one programming language with the functional paradigm: F#. And after a bit of research, I found out that F# is (or was) the .NET port of CAML, which is deri...
Possible Duplicate: Where can I find programming work online? I saw oDesk.com being mentioned in one thread here for contract work and freelance work, and the people listed for hire is asking for $15/hour and up to $80 or $100/hour -- of the ones that I saw for development jobs. I wonder what alternatives there are...
Why do software companies use download wizards for large files instead of letting users download the file directly? Is it so the user does not get discouraged by the waiting time, or is it something else?
What's the best way to store 3D point cloud data, optimising for time it takes to find all the points in a sphere of 3D space, and also for time it takes to insert new data points into the data set? Background: I have a cloud of 3D point data (with each point also including some further attached data), and need to be a...
As I understand it, abstraction is the term we use for when more meaning is created out of something simpler without altering it. It is derived from the latin verb abstrahere (to ‘draw away’). For instance, text is just one abstraction of binary data—as are bitmaps. So, in computers, text and bitmaps exist on top of (a...
So I am trying my hand at this whole tiered application thing with ASP.NET 4. The software I've developed is a maintenance nightmare and it isn't very well organized. I've done some looking around the web and can't seem to find an example of what I'm looking for here. Someone please pick this design apart. My Data A...
I was under the impression that the concepts of time and memory complexity are a must for graduates of compsci courses, but having studied engineering I have no knowledge if that is the case. I have recently been surprised to interview some graduates of a local college that do not even know the concept. I guess my ques...
I know you can use C# and F# together in the same project however I'm not sure if its a good idea to do so. It seems to me that mixing two very different coding styles (functional vs OOP) could cause a lack of cohesion in the design. Is this correct?
When I was deciding how to go about learning to design PHP web applications, it made sense to sort of shoot toward the middle and go with Zend Framework so that I could be closer to the lower level, but I would be able to get down to business fairly easily, too, while learning about design patterns, etc. That seemed to...
I am working on the application which in near future (hopefully) will have to process tens or hundreds of thousands of items (item is currently one row in relational database table) per second. If I understood it right NoSQL databases are superheroes of data retrieval thanks to map-reduce magic. But will NoSQL database...
Ya !! you can say "out of work" people have these thoughts, but then, what can one do :-P . My question is somewhat deep thought. How can someone evaluate himself as a developer and manager to understand whether or not, he is fit for starting a commercial venture on his own. Starting a development company doesn't need...
Introduction An Adapter normally wraps another object, so that it can be used in an interface it wasn't designed for, e.g., when you want to use interface Node { Node parent(); Iterable<Node> children(); } together with class TreeModel { private Node root; // example method (stupid) Node grandparen...
Well, I know that there are things like malloc/free for C, and new/using-a-destructor for memory management in C++, but I was wondering why there aren't "new updates" to these languages that allow the user to have the option to manually manage memory, or for the system to do it automatically (garbage collection)? Somew...
Given a particular third-party class/library you want to make use of, the simplest thing to do would be to just hardcode API calls to it through your application. On the other hand you have the possibility of defining a interface that generically dictates what you want -not how-, and then follow the Adapter pattern to ...
It seems to me that everything that can be done with a stack can be done with the heap, but not everything that can be done with the heap can be done with the stack. Is that correct? Then for simplicity's sake, and even if we do lose a little amount of performance with certain workloads, couldn't it be better to just g...
Being new to Java I'd like to use the following scenario to steer my learning and could use some advice! First I want to build a Java server app that handles login and client settings, and based on client info pulls up random database entries and sends these random entries to the client on a timer. This must work for ...
I'm thinking of using TFS Build workflows for complex deployments. We have some that may need to deploy: Web applications and services Database SSRS Reports SSIS Packages Who knows what else I like the fact that I can give the workflow some basic parameters like which build to deploy and it would just run. Potentiall...
Do any languages really need garbage collection? Is there not a way to figure out when a object should be destroyed? I haven't had leaks in C++ and i dont use smart pointers or reference counters or anything special. I confirm this by attaching something for leak detection: whether its built in to the IDE or a header t...
If you find out a way to interact with a web service API that is not publicly documented as available, and can emulate it within an application you develop, is it illegal to do so? Furthermore is it illegal to charge for a product that you build to interact with these services (maybe all that's needed is a reference t...
While I am studying for job interview, I got this kind of OOD questions a lot. But from my TDD perspective, I think it would be reasonable to ask more about use-cases of (or requirements for) the Car. Otherwise, there are tons of way of designing car. Am I missing something here? How would you handle this sort of inter...
I've asked a very similar question few days ago, but because I presented too much of my company's current situation, most answers focused completely on something that I wasn't looking to answer. So I wanted to try again... Given just about any agile team, you always have people with varied a) knowledge of the product ...
Regular expressions are powerful tool in programmer's arsenal, but - there are some cases when they are not a best choice, or even outright harmful. Simple example #1 is parsing HTML with regexp - a known road to numerous bugs. Probably, this also attributes to parsing in general. But, are there other clearly no-go a...
First, unless anyone has better definitions, let's define "back end" and "front end" according to their usage here: Is it common to separate back-end and front-end into two positions on web development projects?. How common is it to find programmers exclusively assigned to back end or front end roles on a team? What's...
I've noticed on MySQLWorkbench that you can choose how to store your indexes before forward engineering your design. The storage types are: BTREE RTREE HASH Researching this, I found some information that was pretty much over my head, so I'm looking for practical information on what the difference is between these an...
In relational world we have Foreign Keys to reference other entities. But how do document-oriented databases like MongoDb, CouchDb, RavenDb implement references among entities? Update. StackExchange related example. We have Question entity and its tags. Each tag, is a separate entity so it has its properties (for examp...
I have heard people say that variables should be declared as close to their usage as possible. I don't understand this. For example, this policy would suggest I should do this: foreach (var item in veryLongList) { int whereShouldIBeDeclared = item.Id; //... } But surely this means the overheads of creating a new i...
This is actually somewhat related to the question I asked yesterday about why both a Stack and a Heap are necessary in the applications we use today (and why we can't just go with a Heap instead of both, in order to have a simple & singular standard to go by). However, many of the responses indicated that a Stack is ir...
I'm creating a system where items will have one or more tags. Now there will be an item table that will store each item, and a tags table, that will store all tags used in the system. My question is: What is the best design I can have that will allow me to link items to their respective tags, and record how many times ...
I've been introduced to Computer Science for a little over a year now, and from my experience it seems that C and C++ are both considered to be "ultrafast" languages, whereas others such as Python and such scripting languages are usually deemed somewhat slower. But I've also seen many cases where a software project or ...
So I've kind of been getting angry about the current position I'm in, and I'd love to get other developers' input on this. I've been at my current place of employment for about 11 months now. When I began, I was working on all new features. I basically worked on an entire new web project for the first 5-6 months I was ...
I do line of business apps where the all the other developers are used to doing basic CRUD apps or are focused solely on making pretty/functional interfaces and I am getting the following a lot. "With the way we use to do it Employee would have all the things you could possibly do with an employee." And it was true. T...
I'm currently reading a book, chapter about I/O, and one question came to my mind. Basically, when you program in C/C++, you have an amazing opportunity to optimize for hardware behavior. Using buffering for block devices, use streaming and async I/O for high latency network devices and so on. And if you're writing a s...
When you recommend updating jQuery/jQuery UI? Or in other words: what are the best practices for updating jQuery/jQuery UI? I’m working on a long project that will take at least one more year. In that time span, I’m sure that jQuery/jQuery UI will be updated many times. Do you recommend update my jQuery/jQuery UI files...
Just a quick question, but why are there so many file systems still competing and in use today? (ntfs, fat32, ext3(ffs), etc) It seems that file system designers could agree upon the best aspects of each type of system and implement a "best" filesystem, no? Just a thought, since these filesystems have been around for a...
There is always a debate over the topic - "Whether to put the business logic in Stored Procedure or Not?". If we decide not to use the ORM Tool and not to put the Business Logic in Stored Procedure then where would we put the Business Logic? In my previous applications I have always preferred putting all of the Busines...
Is there an exact, but simple and understandable defintion of the distinction between "use case", "User Story" and "Usage Scenario"? there are quite a bunch of explanation, but right now, I see no one that explains the differences in a single sentence, or two... (e.g. http://c2.com/cgi-bin/wiki?UserStoryAndUseCaseCom...
As an expansion from my previous question about using separate projects for seperate layers - Good practice on Visual Studio Solutions I now wish to know if I am putting the right functionality in the correct layers. Background I'm building a WPF application from scratch, that contains business logic and business objec...
In language like C or Java, there are things like functions/methods to modularize and abstract stuff. What is there in SQL, specifically for Oracle? I've seen people talking about using views to reduce the complexity in various blogs but there is only so much that can be done with a view. (For example, a bind variable ...
I'm using xml to store cross-program information. This information is used in some webpages and in C# programs. When the information is altered, these alterations are not displayed right away in the webpages, they keep on displaying the information saved in cache, it takes a few refreshes for the webpage to show these ...
Consider a typical Kanban board: Input, Analysis, Dev Ready, Development, Build Ready, Test, Release Ready How to specify WIP limits for each column? any formula?
I understand why it is a good idea to code to an interface rather than to a concrete class. I find it hard to implement though as other methods generally need to use properties of the given object. Have I got the wrong end of the stick?
So, something's been bugging me about the new async support in C# 5: The user presses a button which starts an async operation. The call returns immediately and the message pump starts running again - that's the whole point. So the user can press the button again - causing re-entrancy. What if this is a problem? In the...
I come from languages like Python or Javascript (and others that are less object-oriented) and I am trying to improve my working knowledge of Java, which I know only in a superficial way. Is it considered a bad practice to always prepend this to the current instance attributes? It feels more natural to me to write ... ...
I am using a DDD-like approach for a greenfield module of an existing application; it's not 100% DDD due to architecture but I'm trying to use some DDD concepts. I have a bounded context (I think that's the proper term - I'm still learning about DDD) consisting of two Entities: Conversation and Message. Conversation ...
We're currently working on a medium/large PHP/MySQL project. We're doing unit testing with PHPUnit & QUnit and we have two full time testers that are manually testing the application. Our test (mock) data is currently created with SQL scripts. We have problem with maintaining scripts for test data. The business logic ...
My background is electrical engineering, DSP to be more precise. The company I currently work for does a lot of diverse projects, mostly building analog hardware. Being somewhat closer to computers than everybody else around here I'm often the one writing code for both embedded devices (which I'm perfectly fine with) a...
In When to use C over C++, and C++ over C? there is a statement wrt. to code size / C++ exceptions: Jerry answers (among other points): (...) it tends to be more difficult to produce truly tiny executables with C++. For really small systems, you're rarely writing a lot of code anyway, and the extra (...) to which I a...
I want to code my next work project in a language I'm unfamiliar with (python). I can think of plenty of reasons from my point of view why its a good idea (not least of all because it sounds fun). However my manager will probably ask me why. I'm a little stumped on the advantages from his point of view. EDIT: I normal...
I have developed a system with one company profile. The system is built using WCF services, asp.net. Now another company wants to use our system as well. And they might need some customization and some of their data elements are different. So I am planning to create a separate database for the new company and branch t...
nolo.com says: "If you want to stop someone from using or otherwise infringing on your work, you must sue the infringer in federal court. However, in order to do so, you must first have registered the copyright with the U.S. Copyright Office." Is it true that the only way to take legal action against software copyrigh...
4-bytes = word; 8-bytes = 2x word Then why doesn't the heap just go with 4-byte alignment (because it will be grabbing a word at a time anyway, right?) If we went with 8-byte alignments, why not 12? 16?
Apparently, the two major judging criteria of the effectiveness of heaps are (1) how much we can minimize the amount of space it takes up and (2) how fast operations on the heap can be carried out, eg, malloc and free But I was wondering how these two criteria were related, namely, why there is a 'tradeoff' and why a f...
It seems that C has its own quasi-objects such as 'structs' that can be considered as objects (in the high-level way that we would normally think). And also, C files themselves are basically separate "modules", right? Then aren't modules kind of like 'objects' too? I'm confused as to why C, which seems so similar to C+...
A little background: I am one of two programmers for our department of 10 people (the rest are artists and management). The two of us do all of the coding required to make things flow well, and develop any projects that come up. I've been programming for about 4 years now, where this is his first "real" job (as he puts...
I do a lot of work in Python and Java, and both those languages have fairly common (though not universal) conventions on how capitalization should be used in identifiers: both use PascalCase for class names and ALL_CAPS for "global" constants, but for other identifiers a lot of Java code uses mixedCase whereas a lot of...
In Eric Lippert's article What's Up With Hungarian Notation?, he states that the purpose of Hungarian Notation (the good kind) is to extend the concept of "type" to encompass semantic information in addition to storage representation information. A simple example would be prefixing a variable that represents an X-coo...
I'm a great believer in clean code and code craftsmanship, though I'm currently at a job where this isn't regarded as a top priority. I sometimes find myself in a situation where a peer's code is riddled with messy design and very little concern for future maintenance, though it's functional and contains little to no b...
When I was in university, I participated in a programming contest; the problems turned out to be extremely difficult and boring, and they required previous knowledge about a particular set of problem, e.g. graph theory, algebra. Our team failed completely at that competition, without solving any problems at all. After ...
I've seen this a lot in our legacy system at work - functions that go something like this: bool todo = false; if(cond1) { ... // lots of code here if(cond2) todo = true; ... // some other code here } if(todo) { ... } In other words, the function has two parts. The first part does some sort of processing (...
I have a website that is about electronics. I want to make some functional calculators such as calculation for analog filters which will have to show lots of plots and stuff like that. This is a sample of what I am looking for and obviously it is only PHP and its graphic functions. I want to have similar thing but much...
Given T={CTAGC, GAGCG, AGCGG, CGGAG}, using a greedy algorithm, the superstring S will be CTAGCGGAGCG. From S, the combination of triplets will be given as s = {CTA, TAG, AGC, GCG, CGG, GGA, GAG, AGC, GCG}. Both GCG and AGC are repeated. If using s to retrieve the superstring by using Hamiltonian method, would the repe...
To start with some background, I took up a new developer position this summer and ended up being the newest member on the team, yet with most experience under the belt. So far I have managed to push sanity initiatives through easily enough because of low adoption costs (in terms of time and effort). However things have...
Had a conversation with someone about adding some initialization code on application startup and he complained about that causing an increasing in the startup time. He couldn't really state a reason (gut feeling or something, don't know). This is not a heavy use application and starts in about a minute or so, we deploy...
I am working on an application right now that needs a way for employees to log in to the back-end of the public facing application for some basic reporting. If you were creating this, would you put the admin interface on the public side or on the intranet side? Update: It is the back-end of our eCommerce application. ...
I noticed that overtime with experience that the curve of learning shifts from trying to learn a language or technology (the way it works) to how to develop applications faster and with less code. I am very interested to see how other developers have minimized the time it takes to get applications to market. I know for...
Possible Duplicate: What should every programmer know about web development? I'm 15 years old. I've been programming for 2 years. I suppose I am a good programmer (not designer). I can use PHP(Good), Css(simple), and JQuery(not too bad). What else can I learn related to web development (maybe system programming)? Th...
I have been doing some browser automation testing recently using Selenium (and Watin a bit too) and have reached a point where I am looking for recommendations on controlling the environment I'm testing. For example, if I have a test that registers a new user on site (or similar database dependent task); how do people ...
In my 2d destruction derby simulator I have a CargoTruck class and CargoTruckImpl that implement an interface called Truck. CargoTruck has a reference to CargoTruckImpl which is returned through the CargoTruckImplFactory. But then I decided to add to this chain by having CargoTruckImpl and CargoTruckMovementImpl use th...
When recieving data from clients how much data that you provided to them should you require back from them? For example when clients order a product from a webservice should they just need to provide a product code? The other alternative would be to require the product code product name and product price ect. I have al...
When we talk about source code and the file which contains the code like CSS, HTML, JavaScript and we also talk about performance of a web site or application, what is the differences between these terms? Optimization Compression Minification Tidying Concatenation
Right now I'm trying to create a Heap that requires 8-byte alignment, and was looking around online for some good methods that would minimize the amount of fragmentation. Less fragmentation is ideal, and even the ones that will slow down a lot are a consideration (but speed is also a sub-goal here) Has anyone had any e...
We are a team of about 15 employees, in a non-IT enterprise. Today, we mainly develop websites, using PHP, MySQL, etc. We run a bit less than 100 linux servers on ourselves. But today, we are confronted with a too-big-for-us-to-code project. We selected a great provider (yes, outsourcing), and now they ask us to choose...
Possible Duplicate: Is it necessary to create a database with as few tables as possible I've recently started to develop a database for a ~10 person office (it's an internship for me), and I've come up with a conceptual design I am quite happy with. My employers though, wish for me to simplify my design (less tables...
I have almost 5 years of experience as a web developer, and feel that I should be mid-level by now, but when I walk the walk I think I'm still pretty "junior" at it. Here's what I think is the problem: For most of my career, I seldom had any real guidance by a more senior developer and zero experience with developer te...
I am writing a functional specification for a software program (Mac OS X application to be exact). I want to improve this by looking at other (good) functional specifications, but I cannot find any. Are there any (open-source) projects that have their specs publicly available so I can learn from them and improve my spe...
In Dijkstra's paper "Humble Programmer", he mentions that he gave some volunteers a problem to solve: “I have run a little programming experiment with really experienced volunteers, but something quite unintended and quite unexpected turned up. None of my volunteers found the obvious and most elegant solution. Upon cl...
I thought that many object-oriented languages have a reserved keyword for methods which do not modify the state of an object. These methods often have names that start with get. AFAIK a "getter" is always related to a single object attribute and "accessor" is too general, so "readonly" may the right term for this kind ...
Which problems domains are more suited to functional programming solutions and why? Can anyone provide any examples? EDIT Just to clarify, I'm not asking for a list of problems. I want to know what type of problems are best suited to functional solutions. For example I have heard financial problems are solved well wit...
I currently have code like this to display some objects that meet some criteria in a grid: // simplified void MyDialog::OnTimer() { UpdateDisplay(); } void MyDialog::UpdateDisplay() { std::list<MyClass *> objects; someService_->GetObjectsMeetingCriteria(objects, sortField, sortDirection); for(std::lis...
I'm learning Java, and I found a great teacher. He explains everything perfectly. I understand it all. My problem, is that after learning a short section, for example "Nested If Statements" or "Many Methods and Instances", I can type it all great, but in 5 mins, after going on to a new section (when I'm comfortable wit...
Having this sentence (consider many sentences in the future) David Henderson Houston patented the first roll film for cameras in 1881. I can make questions like 1. Who patented the roll film? 2. When was the first roll film for cameras patented? 3. What did David Houston patent (in 1881)? The answer will return so...
It’s become an annoying factor of working with large teams: how do you manage checkins and prevent feature conflicts and manage dependencies with source control properly? Currently at my workplace we use TFS 2008 and we're migrating to TFS 2010 in early December. Firstly any source control is better than none but what...
I've always thought that referring to the syntax of a language was the same as referring to the semantics of a language. But I've been informed that apparently that's not the case. What's the difference?
I've been reading this article by Mike Cohn about Scrum task boards. One query I have is how this fits into a workflow where there is QA stage performed by testers who aren't developers. It seems that many tasks could not easily be QA'd in isolation. A practical alternative could be that the "To Verify" process should ...
My non-technical manager just paid for a license to use a tool which designed to pick mentions of your brand name at blogs, "social media", comments, etc. and gauge the sentiment (positive, neutral, negative) of the post. What he wants me to do is use it to do a task which can only be achieved with a certain level of n...
So we're pretty good at eliciting requirements from our end customers, business division and sales/marketing. We plan projects to add/enhance features to meet those requests and prioritize tasks to meet deadlines in most profitable order. Over time, the software product has grown, the market has changed and the origina...
I searched the forum, but I couldn't find the answers why it should be avoided, only why it's not a silver bullet. So I don't think this question is a duplicate. Is there a VALID reason why I should unlearn Systems Hungarian I'm used to? So far I see the following benefits in using it: Consistent variable naming You s...
How effective are unit tests in reality? I am under the impression that at some point unit tests turn into tests that test the dependency between the object under test and another object. Sure, one can always abstract dependencies using interfaces, but what happens when even the interfaces should be changed? What if t...
If you work with SharePoint, you'll see classes like SPList, SPSite etc. I've seen variations of this on other projects, in other technologies, e.g. for a CRM project, classes named CRMLoggingFactory, CRMEntity etc. This stands out when you look at the code and you know what the prefix corresponds to, but when do you d...
One limitation of a program that I maintain is that the end-users often don't know what changes have been made. To remedy this I would like to show my users a simplified list of changes made to their program. Is there a good methodology/approach to follow that would create a easy to update list that could then be fed ...
I'm working with an ASP.net developer, under a boss who doesn't have much technical knowledge. I'm doing the front-end work, and and a database expert doing the backend. However, recently, he said that he would be working on the API for our site- I asked why, thinking we should do the web version first, assuming the AP...
Based on my experience in technical interviews, I have found that most tend to be subjective because the interviewer already has his own answer. Even though the answer from the candidate is correct, because the interviewer was not prepared for that answer, the candidate does not get the job. In an interview recently I ...
This is the password policy I just got from UPS (just for package status checking): Your password must be between 8 and 26 characters long. It must contain at least three of the following character types: lowercase letters, capital letters, numerals, special characters, or spaces. The password may not contain yo...
As per the title of this question, for extremely performance critical situations, is storing a file's metadata (e.g. location, size, download on, etc) in a database going to allow for better performance than attempting to get it from the file system itself? Have there been any case studies into this problem? To provide...
I just finished a technical interview yesterday and the interviewer asked about graph theory, data structure, and traversals. This has nothing to do with iOS stuff. So I came un-prepared. This was actually for a social mobile gaming company, is this the reason why they ask these kind of stuff instead of iOS stuff? Now ...