instruction stringlengths 34 36.1k |
|---|
I read this thread on programmers today and thought that looked like a really elegant way of coding. I would like to discover more neat methods of coding.
What are the best ways of discovering new elegant ways of coding? (Im already aware of the standard design patterns)
|
I'm in a bit of a disagreement with a more experienced developer on this issue, and wondering what others think about it; our environment is Java, EJB 3, services, etc.
The code I wrote calls a service to get things and to create things. The problem I ran into was that I got null pointer exceptions that didn't make sen... |
I am a programmer that can code. But I find that I can get thing done, but not get thing do well or like most of the open source communities do. Well, I use some of the library from git hub. I find most of the programme is well structure. Also, a read me.
My question are:
Is that any common file structure or naming c... |
We have unfinished tasks which are part of stories in sprint. They are not accepted by the PO.
They must be included for the next planning of sprint.
Obviously the stories must be moved, but what about the tasks? Shall they be reopened and moved for the next sprint within the stories or not?
|
When one business acquires another, they use a Memorandum of Understanding, which is basically an agreement outlining the duties of each party, etc.
I am about to begin a massive web development project for a client - What is the equivalent agreement I would use with them?
|
I am asking this because I have seen places where, whoever coded initially had provided proper comments, but later on modifications were made to the code but the comments were left untouched. I remember reading somewhere " Don't get suckered in by the comments, debug only code".
So is it a good/ relevant/ practical id... |
I'm currently evaluating license management solutions for our customized and project-based applications, which are supported by a single server in the intranet of the customer. The applications use common functionality provided by the server (session handling, data synchronization, management capabilities, etc) and are... |
As you develop as a programmer, software developer, or coder, IMHO, you begin to see different (best or worst) practices, different algorithms, and "more than one way to do it". Seeing this code can be a great learning experience for you, even though you did not write the code. But is doing this only going to confuse y... |
I want to build a SyncML parsing library (no UI) which should be able to build up messages based on information provided by the host application, fed in by the library's methods. Also, the library should to be able to do callbacks to methods in the host application.
I want to be able to compile this and have it availab... |
I am 12 years old and have mastered the basics of Python with Learn Python The Hard Way by Zed Shaw (I think) and it has done me well. What should I do next? Do you have any recommended books or good website tutorials? What do you need to know before learning C?
|
How do you keep everything straight as you trace deeply into a piece of software through multiple method calls, object constructors, object factories, and even spring wiring. I find that 4 or 5 method calls are easy to keep in my head, but once you are going to 8 or 9 calls deep it gets hard to keep track of everythin... |
Let's say we have a codebase that is used for many different costumers, and we have some code in it that is relevant only for costumers of type X. Is it better to use preprocessor directives to include this code only in costumer of type X, or to use if statements? To be clearer:
// some code
#if TYPE_X_COSTUMER = 1
//... |
Trailing whitespace is enough of a problem for programmers that editors like Emacs have special functions that highlight it or get rid of it automatically, and many coding standards require you to eliminate all instances of it. I'm not entirely sure why though. I can think of one practical reason of avoiding unnecessar... |
Basically I have a team class, which has an array list that store the players in. In the driver class there's an arraylist that stores the teams.
Anyhow I've worked out how to add a player to a specific team and likewise remove a player from said team. Where I'm hitting problems is when I try to transfer one player to ... |
I was testing PHP rand function to write on a image. Of course the output shows that it's not so random. The code I used:
<?php
header('Content-Type: image/png');
$lenght = 512;
$im = imagecreatetruecolor($lenght, $lenght);
$blue = imagecolorallocate($im, 0, 255, 255);
for ($y = 0; $y < $lenght; $y++) {
for ($x = ... |
I just ran into an "interesting problem", which I would like your opinion about:
I am developing a system and for many reasons (meaning: abstraction, technology independence, etc) we create our own types for exchanging information.
For instance: if there is a method which is called SendEmail and is invoked by the busin... |
I read the Wikipedia articles on both, and both are not mentioned together. Also, the purpose of OSGi is not Dependency Injection. Yet, what an OSGi container like Felix does matches the description for DI.
|
I'm working on a project where we have the source control set up to automatically write notes in the bug tracker. We simply write the bug issue ID in the commit message and the commit message is added as a note to the bug tracker.
I can see only a few downsides for this practice. If sometime in the future the source co... |
In my experience, the "Model" in MVC is often not really a single layer. I would regularly have "backend" models and "frontend" models, where the backend ones would have properties that I want to hide from the UI code, and the frontend ones have derived or composite properties which are more meaningful in the context o... |
I have to work on some docs, I need a software that can trace all the modifications that I will make to a specific file or project (group of files): is there something like that?
The important thing is that I have to do that with a single machine so I do not need a distributed solution, I only have to work with txt fil... |
I have been writing an open standard for a protocol I am developing. As far as writing concerns I have it under control. But the main question is where can I publish such document. I have been searching on the internet and didn't find such site where I could upload a TXT or PDF file. I have no intention of keeping secr... |
I have a very large SVN repository (working copy of several gb) that has just reached its 20,000th checkin. As a bit of an interesting statistic for our team (and to partly celebrate our 20,000th checkin) I'd like to make a graph showing which folders in the repository have had the most checkins.
Is there any way to do... |
I am writing a rules/eligibility Module.
I have 2 sets of data, one is the customer data and the other is the customer products data.
Customer data to Customer products data is one to many.
Now I have to go through a set of Eligibility rules for each of this Customer product data.
For each customer products data, I c... |
Actually I'm dealing with a trouble in my system, I have to delivery the system to clients and it was built in PHP, JS, ShellScript and SQL.
I would like to encrypt the code or obfuscate it from eyes of others! Then someone from the community told me about building my own PHP extension, it sounds to me as a great idea... |
I'm taking financial mathematics as an elective, and I'm working with real life finance industry worker type people. It's actually kind of fun. When I pulled out a macbook at one of our meetings, I had four lifelong windows users look at me like I had three heads.
Anyway, I'm helping with design and simulation of our ... |
I want to know the approach in developing big complex application regardless of which programming language to use. I want to know how developers make such big applications such as internet banking, API's and big database management application. How should one approach to make such applications. I have only 1 year prog... |
I'm designing a carpool system (drivers can publish their routes and passengers can subscribe to them) with WebServices(axis2) and Android clients (ksoap2).
I have been having problems with the logical architecture of the system and I wondered if this architecture is fine.
And another question: for that architecture ... |
I need to learn how databases work in order to use them more efficiently, and my way of learning is by doing.
I want to create my own database system. I am not referring to creating a pseudo-database that would use query to parse files; this would simply be a filesystem interface with a query language. I am talking abo... |
if a JQuery plugin is released under the CC BY-SA 3.0 license, can it be used as part of a closed source commercial web application which is not redistributed, just accessible on the web?
|
I'll preface this with I don't know if anyone else who's been programming as long as I have actually has this problem, but at the very least, the answer might help someone with less xp.
I just stared at this code for 5 minutes, thinking I was losing my mind that it didn't work:
var usedNames = new HashSet<string>()... |
We are trying to switch to a continuous integration environment but are not sure when to do code reviews. From what I've read of continuous integration, we should be attempting to check in code as often as multiple times a day. I assume, this even means for features that are not yet complete.
So the question is, when... |
My project manager assigned me a task to estimate the development time for an iPad application. Lets assume that I gave estimation of 15 working days. He thought that the number of days where too many and client needed the changes to the application urgently (as in most of cases).
So, he told me: "I am going to assign ... |
Problem is, we have developed a small CMS, that is different per implementation (currently).
Of course development of this is never complete. Sometimes, we are working on more than one project that implements it (by copying-pasting the code files of the CMS to each project), and we add a new feature that we want to sha... |
Reading books, watching videos, and reviewing tutorials is all very easy. Taking notes and actually learning the material may be slightly harder, but even then, anyone with a decent brain and a fair amount of interest, it's easy enough (not to mention, fun).
The thing is, it doesn't really prepare you to write a full p... |
I have a list of objects that need to be processed in some way. That way may not be correct for an item and thus raise an exception. In pseudo-code, it would look like:
proccessItems (list)
error = new empty list
for item in list:
try:
process_item(item)
catch Whatever, err:
error.append(err)
... |
I have 10 developers and 3 Testes team and I want to setup CruiseControle as CI for automated builds, tests and deployment to production server and some repository for SCM ( Source Code Management). I need something that would enable the team lead to create tickets (tasks) for each sprint in SCRUM and issue/bug tracki... |
Recently I came across the question NSString: Why use static over literal? and in the comments arrived a new question.
In Objective-C there some "special" types that are just maps to C primitives. Like the NSInteger.
#if __LP64__ || (TARGET_OS_EMBEDDED && !TARGET_OS_IPHONE) || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64
typ... |
We are on the stage of planning a CakePHP project.
It is a relatively a big project for us, as a developer+project manager, I want to hire someone
to work with me. But what I really want is to spend less time on actual coding, without losing control
of the code quality.
What I want to do is that I will design all the f... |
I'm looking to add push notifications to one of my iOS apps. The app is a client for a website which doesn't offer push notifications.
What I've come up with so far:
App sends a message to home server when transitioning to background, asking the server to start polling the website for the logged in user.
The home ser... |
I'm a physicist with a CS degree and just started my PhD at a tech company (wanted to do applied research). It deals with large scale finite element simulations.
After reviewing their current approach, I think that a radically different method has to be applied (they are using a commercial tool which is very limited). ... |
I'm trying to do some huge AI system just for the fun and I've come to this problem.
How can I let the AI entities know about each other without getting the CPU to perform redundant and costly work? Every entity has a spatial awareness zone and it has to know what's inside when it has to decide what to do.
First thoug... |
Could Java ever match C++ with regards to programming ultra high frequency systems? Has the JVM improved enough to allow this? From a theoretical or practical point is it possible?
Is C++ used in most UHF systems simply because out of habit?
If you agree/disagree, what parts to Java/C++ is the basis for your viewpoint... |
So I've been programming for about 9ish months now, and I've taught myself some Python, some PHP and some Javascript.
I want to become better at these languages - I can hack something out, but a lot of things like OOP, using lists in the most effective ways, etc, is lost on me.
What are the best ways to become an "expe... |
I was just wondering if there were some "standard" examples that everyone uses as a basis for explaining the nature of a problem that requires the use of a buffer. What are some well-known problems in the real world that can see great benefits from using a buffer?
Also, a little background or explanation as to why the ... |
Possible Duplicate:
“Comments are a code smell”
I am a graduate software developer for an insurance company that uses an old COBOL-like language/flat-file record storage system. The code is completely undocumented, both code comments and overall system design and there is no help on the web (unused outside the indus... |
From Polymorphism on WIkipedia
In computer science, polymorphism is a programming language feature that allows values of different data types to be handled using a uniform interface.
From duck typing on Wikipedia
In computer programming with object-oriented programming languages, duck typing is a style of dynamic ty... |
I know there are going to always be differences depending on the particular size, staff etc, but i wanted to get feedback in general around:
In an environment where you have a production support team doing first line support and release management, is it better to simply have developers manage their own releases instea... |
I have a Compaq nw8440 with a smart card reader that is:
Compatible with ISO 7816 compliant Smart Cards. PC/SC interface support
I have been interested in smart cards and wanted to start playing around with them. If I wanted to get in to programming smart cards where can I find resources on how to do it, and would I ... |
Possible Duplicate:
Why programming open source?
I'm having trouble understanding why people dedicate their time to an open source project that's free as in beer instead of focusing on a closed source, paid project.
Closed source projects seem to be more commercially viable, so why do programmers open source their c... |
This question is in conjuction with How would you approach developing a Hotel Reservation System?
The solution to a system with different interfaces (or clients I should say) is to go with developing a Web service and have other systems interact with it.
I never had the requirement for developing a Web service so I am ... |
We're making a bespoke software for our client and use Codebase for our project management. Is it a good idea to let our client view our project management board?
The advantages that we thought of are that this would enhance the cooperation between the client and the dev team, following agile practices. He would essent... |
English in not my native language, therefore it is a little more difficult to pick a good name for a namespace. One example to make you see my problem a bit better:
We have a set of classes that have to do with the way a company is organized (we can create organizational charts with it). Currently the namespace is CFW.... |
I have learned in Agile Development that:
Refactoring is the process of clarifying and simplifying the design of
existing code, without changing its behavior.
I have heard about some GUI refactoring tools like ReSharper and DevExpress Refactor Pro!
Here are my questions:
How does it takes place in the Softwa... |
let's start off with the problem statement:
My iOS application has a login form. When the user logs in, a call is made to my API and access granted or denied. If access was granted, I want the user to be able to upload pictures to his account and/or manage them.
As storage I've picked Amazon S3, and I figured it'd be a... |
It is also true that a system may become so coupled, where each class
is dependent on other classes that depend on other classes, that it is
no longer possible to make a change in one place without having a
ripple effect and having to make subsequent changes in many places.[1]
This is why using an interface or an abst... |
Possible Duplicate:
if I use .NET Framework for my application, do I have to pay anything to Microsoft?
I have developed a desktop application called "Institute Management System" which has modules like Class manager, Subject manager, Topics manager, Student inquiry manager Student admission manager, Fees manager, E... |
I just started with functional programming (with JavaScript and Node.js) and from the look of things it looks as if the code I am writing would grow to be one hell of a code base to manage, when compared to programming languages that have a sort of object oriented paradigm.
With OOP I am familiar with practices that w... |
I want my scribbles of a program's design and behaviour to become more streamlined and have a common language with other developers.
I looked at UML and in principle it seems to be what I'm looking for, but it seems to be overkill. The information I found online also seems very bloated and academic.
How can I understan... |
Possible Duplicate:
How do you dive into large code bases?
I have quite a bit of experience with different programming languages and writing small and functional programs for a variety of purposes. My coding skills aren't what I have a problem with. In fact, I've written a decent web application from scratch for m... |
Possible Duplicate:
Data input validation - Where? How much?
I'm a new PHP developer and am into Powershell quite a bit but this question is language agnostic. I've been questioning my code quite a bit lately thinking about how many nets I should setup to catch exceptions, verify results, etc. I realize that I cou... |
This is one of the bonus questions in my assignment.
The specific questions is to see the input list as a set and output all subsets of it in a list. We can only use cons, first, rest, empty?, empty, lambda, and cond. And we can only define exactly once.
But after a night's thinking I don't see it possible to go throug... |
I'm working on a middle-tier project which encapsulates the business logic (uses a DAL layer, and serves a web application server [ASP.net]) of a product deployed in a LAN. The BL serves as a bunch of services and data objects that are invoked upon user action.
At present times, the DAL acts as a separate application w... |
As I thought about writing an operating system, I came across a point that I really couldn't figure out on my own:
Can an operating system truly be written in an Object-Oriented Programming (OOP) Language?
Being that these types of languages do not allow for direct accessing of memory, wouldn't this make it impossible ... |
Possible Duplicate:
Best way to estimate cost related to porting code from language A to language B?
We have an MFC C++ program with around 200,000 lines of code in it. It's pretty much finished. We'd like to hire someone to convert it to work for Macs, but we are not sure how to properly estimate a reasonable time... |
I'm looking to create a game in Java and would like it to work on Windows, Linux, and Mac. I'm pretty sure C# is a bad choice for this, and I don't have enough experience in C or C++. I want to stay away from Flash. Therefore, is Java a good choice for me? Mostly, I use C#, and think that Java is similar, so I assume i... |
I came across a question which asked the difference between Function Templates and Template Functions in C++ and also Template Classes and Class Templates.
I was under the impression that Function Templates and Template Functions were the same thing. Is there any difference between the two, if so what is it?
|
So I am trying to develop an activity feed for my site. Basically If I UNION a bunch of activities into a feed I would end up with something like the following.
Chris is now friends with Mark
Chris is now friends with Dave
What I want though is a neater way of grouping these similar posts so the feed doesn't give inf... |
I read Kruskal's algorithm as it's presented on Wikipedia. There, it says that it's an algorithm in graph theory that finds a minimum spanning tree for a connected weighted graph.
But while going through the examples that illustrate this algorithm I am unable to understand why the loops are avoided by marking some of t... |
Most of times I get to know about the new features too late. It is okay at least I know about them does not matter from where I know But I feel it is too late to know about those features.
I am working on LAMP platform and I want to keep myself up to date with the new things, anything happening new with LAMP.
Can you ... |
In my code I check the current version of the software on launch and compare it to the version stored in the user's data file(s). If the version is newer, then I call different methods to update the old data to the newer data version, if necessary.
I usually have to make a new method to convert the data with each upda... |
I want to create a service where people can upload files. However, since file storage costs money, I want to compress the files so they take less space. I would want to write my own compression algorithm, however, PHP doesn't have good ways to handle binary data (which is needed for many compression algorithms). So I w... |
My understanding is that:
MIT-licensed projects can be used/redistributed in BSD-licensed projects.
BSD-licensed projects can be used/redistributed in MIT-licensed projects.
The MIT and the BSD 2-clause licenses are essentially identical.
BSD 3-clause = BSD 2-clause + the "no endorsement" clause
Issuing a dual license... |
I am trying to figure out why we need URIs for XML namespaces and I cannot find a purpose for that. Can anyone brighten me a little showing their use on a concrete example?
EDIT:
Ok so for instance: I have this from w3schools
<root
xmlns:h="http://www.w3.org/TR/html4/"
xmlns:f="http://www.w3schools.com/furniture">
... |
What is the name of the pattern in which individual contributors (programmers/designers) developed an artifact for the sole purpose is to serve as a diversion so that management can remove that feature in the final product?
This is a folklore I heard from an ex-colleague who used to work at a large game development com... |
I've seen the book Working Effectively with Legacy Code recommended a few times. What are the key points of this book?
Is there much more to dealing with legacy code than adding unit/integration tests and then refactoring?
|
When working in a TDD or BDD manner your unit tests are supposed to drive your design. But how do you end up with event-sourcing using a xDD techniques? As I see it event sourcing is something you need to adopt early on to take full advantage of it.
Lets say that you start without event-sourcing and do a release. Late... |
I am just starting out learning Visual Basic 2010. I have books and videos. The books all seem to be written for people who have some programming experience, even the books that say they are for beginners.
The videos were great until they started talking about variables. I got the basics of them but they started into... |
How do you stay backward compatible with event-sourcing? Let say you release a version that has one kind of event, let call it X. You know how to handle that event in all the systems that extracts the events from the event source. In a later release you make a change to event X or delete it, how do you stay backward co... |
Original Question
I already did some interviews for my company, mostly computer scientists for dev positions but also some testers and project managers. Now I have to fill a vacancy in our research group within the R&D department (side note: “research” means that we try to solve problems in our professional domain/mark... |
Possible Duplicate:
A simple ways to improve the release quality in RAD environment
This is year 3 and product is selling good enough. Now we need to enforce good software development practices. The goal is to monitor incoming bug reports and reduce them, allow never ending features and get ready for scaling 10x.
Th... |
I was curious about GUI design patterns, so I searched and got some information, including a list of UI patterns for the web. This UI patterns website says that:
UI Patterns is a growing collection of User Interface Design
Principles and User Interface Usability Patterns present on web
applications and sites today... |
DR-DOS, Plan, BSD, Sun Solaris, HP/UX, OpenServer.....and so on.
Why high-tech OSs (like UNIX family) are mostly command based (rather than GUI based)?
|
I'm trying to figure out what are the key technological innovations or inventions that the "cloud" introduces as an improvement over web pages; or maybe over SAAS.
Seems to me that "cloud" is merely a new marketing word for technology that's been around for a while.
|
I decided to improve my knowledge in template meta-programming. I know the syntax and rules and been playing with counteless examples from online resources.
I understand how powerful templates can be and how much compile time optimization they can provide but I still cant "think in templates", I can't seem to know by m... |
I recently found a website called Mathway
Basically, it works by allowing you to choose your "level of math" (which it uses to determine what tools it should provide to you) and then allows you to input a math problem which it then solves for you, and gives you detailed solutions (you have to try it, it's really cool).... |
A few months back, I was doing some recreational reading at the iOS Dev Center, and I came across a small list of guidelines for free vs. paid apps. It included guidance along these lines:
How not to promote a paid version within a free version
Not displaying "placeholder" buttons in a free version that "work" in a pa... |
Throughout my career I had worked at companies that had a collection of different environments for different purposes. We always had more or less our desktop environment, a test environment, a QA environment, a staging environment and a production environment. This went for both servers/applications and any data source... |
I'm looking to offer the user some way of changing how a single page looks based on some pre-defined jsps.
i.e. Two or more jsp's contain similar information, and would be backed by a single controller method. The controller would decide which view to return.
Is there a common way of achieving this?
At the moment I ha... |
I work on a small team of devs, 4 guys. They have all used source control. Most of them can't stand source control and instead choose not to use it. I strongly believe source control is a necessary part of professional development. Several issues make it very difficult to convince them to use source control:
The tea... |
I've seen a number of comments across the web Perl's smart-match operator is broken.
I know it originally was part of Perl 6, then was implemented in Perl 5.10 off of an old version of the spec, and was then corrected in 5.10.1 to match the current Perl 6 spec.
Is the problem fixed in 5.10.1+, or are there other proble... |
In every example I have seen yet almost all of the GUI code is written in the start(Stage stage) method of the main class. Is this the best approach, or is it OK to subclass the Stage class and make your own thing? If the latter is OK, wouldn't the performance suffer because of lot of Stages?
|
I was looking for a pattern/solution that allows me call a method as a runtime exception in a group of different methods without using Reflection. I've recently become aware of the Abstract Factory Pattern.
To me, it looks so much like polymorphism, and I thought it could be a case of polymorphism but without the super... |
So, I've sort of reached a point where I want to start developing a website. Originally, I planned to build said website using PHP and CodeIgniter, I'm familiar with both, but, truth be told, I'm not too fond of either. I find they just get rather messy, CodeIgniter helps somewhat, but no matter what, it seems that mos... |
If you have a list of items and you want to randomly pair the items in the list together, what kind of algorithm would you use to do that, such that the items can only be matched to one other item.
|
The reason I ask this is because isn't a PHP script a route? For example, if you have an article.php then your route is simply http://mysite.com/article.php.
Why further abstract away the concept of a route when it already exists as a simple file?
|
Given how much simpler jQuery development is, when compared to native JavaScript, what makes people forgo libraries like jQuery altogether?
Is this because jQuery has limitations or it is slow? I mean, if jQuery is so easy compared to native javascript, what reasons do people have to still use pure javascript?
|
I am just curious why in the C programming language the function to read formatted input was called "scanf" as opposed to "readf". I assume it is derived from an earlier language, so in that case why was it named that way in the earlier language? (Recurse.)
Also, why "printf" rather than "writef"? In languages other ... |
I often heard the claim that dynamically typed languages are more productive than statically typed languages. What are the reasons for this claim? Isn't it just tooling with modern concepts like convention over configuration, the use of functional programming, advanced programming models and use of consistent abstracti... |
There are more than a few questions that hop into mind when someone thinks about Google's indexing services. Jeff Atwood wrote about them at The Elephant in the Room: Google Monoculture and Trouble In the House of Google.
I have two questions:
How does google index dynamic websites?
This site has dynamic pages, QUEST... |
I am studying for a final exam and I came past a question I had on an earlier test.
The questions asks us to find the minimum value in an unsorted array of integers. We must provide the best upper bound and the best lower bound that you can for the problem in the worst case.
First, in such an example, the upper and low... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.