instruction
stringlengths
34
19.9k
Google announced the chromebook yesterday (11 May 2011). While this is surely a nice thing, I have no clue whether it was interesting to buy one for a (non-javascript)-programmer. What do you think? Will there be, for instance, a Java IDE in the cloud? A command line, even?
apparently, some of our websites have been hacked by a hack bot. The reason: bad input sanitzation. Our boss is giving us this file to put on all our servers to secure them: http://pastebin.com/0gJ19TQG Personally, i just do this on my personal websites: filter_var(mysql_real_escape_string($_POST['Nom']), FILTER_SANITI...
Disclaimer: I'm a newcomer (this is my third day of work), and most of my teammates are more experienced than me. When I look at our code, I see some code smells and bad engineering practices, like the following: Somewhat inconsistent naming guidelines Properties not marked as readonly when possible Large classes - I ...
I am currently a C# developer with a pretty shaky understanding of threading. Both of these links have been suggested in other posts: http://www.yoda.arachsys.com/csharp/threads/ http://www.albahari.com/threading/ Should I go back to basics and maybe look at some computer science texts on the subject? I really feel th...
I'm a consultant at one company. There is another consultant who is a year older than me and has been here 3 months longer than I have, and a full time developer. The full-time developer is great. My concern is that I see the consultant making absolutely terrible design decisions. For example, M:M relationships are ...
Off the clock I'm going to try and come up with a strategy for version control for my company; we currently use SVN but there's no structure to it - we basically only have a trunk and only commit to that. Recently the development manager started a second repository that acts as our "tag", but it has to be manually mer...
I have taken over development of a JSP/Struts application. Right now it's a bit of a mess, and I'm finding the JSP pages with Struts tags to be insanely verbose. Has anyone migrated a Struts application to Groovy/Grails? Can it be done incrementally, page by page? @4bu3li: I was thinking of replacing the JSPs one by...
I am doing out some flow charts and am wondering if I am approaching this correctly. In essence, I have several method calls and I am flowcharting each separately. However, several of these methods make a method call for some info and then continue. See this example: I have 3 other methods that also call GetQueue()...
I really dislike regular expressions, each time I come back to it I seem to have to relearn it. It's also incredibly hard to maintain, modify and at a glance understand what it is doing. Has anyone ever tried writing another layer on top of it that turns more semantic 'sql like' statements into regex? I imagine it wo...
Often, in libraries especially, packages contains classes that are organized around a single concept. Examples: xml, sql, user, config, db. I think we all feel pretty naturally that these packages are correct in the singular. com.myproject.xml.Element com.myproject.sql.Connection com.myproject.user.User com.m...
I'm looking for a site/page somewhere that has translations of common open-source licenses. In particular, I'm looking for translations for the MIT license. Is there a site or resource somewhere that has these translations?
I manage an open source PHP/MySQL web application used by a few K-12 schools and some colleges. I'm also the project's only developer. While it used to be little more than a source download of an application my employer hosts, I've worked over the last year to make it into a "real" open source project, with documenta...
Technically I understand what is cloud computing, but I'm having difficulties when trying to explain it to a layman. I am wondering if there are any good examples which could easily explain it.
I'm looking at architecting a new solution that is very modular by nature and would like to create a structure that supports that design to allow for easy future expansion, clear separation of concerns, licensing by module, etc. Most of what I've found on the web about modular or composite applications are UI-centric,...
After reading Should package names be singular or plural? it occurred to me that I've never seen a proper debate covering one of my pet peeves: naming implementations of interfaces. Let's assume that you have a interface Order that is intended to be implemented in a variety of ways but there is only the initial implem...
I'm writing a small application that will reset the entire “environment” consisting of various machines and applications. Machine names are added via config file - this is read, the appropriate services are stopped and log files deleted. My problem isn’t how to do this (its already working) a bit more elegantly, but...
I'm planning on doing some Java web development in my spare time to learn a new set of programming skills, and just want to survey opinion on why Spring is so good for middleware development? What are the key features and advantages of using this over, say struts or writing server pages?
I program on my desktop in my office, but also sometimes at home in a different room on my laptop, and even away from home. What I need is a system that automatically or on-demand syncs my work from one to the other, at need. I do not have a home network setup, and although I guess I could do it, that would be a quest...
I need to build a social network that is expecting very high traffic, 10k - 50k + registrations in a day, not even including visitors, pageviews, image uploads, etc..., a lot of database activity. We have a solid quad core dedicated server right now with 8GB ddr3 and 2tb hdd sata. Will doctrine be to slow as far as que...
Is there any reason to build constraints between tables (inside SQLserver) nowadays? If so, when? Most applications in my area are built on object principles and tables are joined on demand. Demand are based on the need from the application. I won't load a bunch of constrained tables for a simple look-up, which in turn...
I am leading a QA team of 10 people. we have been received the request for a training of a ETL dataware housing tool for QA, Support and Development. But however the management does not feel that it is important for QA to be involved in such a training as it is support and development team who will be involved ih devel...
I have been programming for 3-4 years now and feel I can no longer be called a beginner, but I read some questions on this site and think WTF are they talking about? I feel the same way when I pick up programming books nowadays. I have read several beginning programming books, some on C/C++ and others on gaming. I hav...
I have been programming recently with Entity Framework 4.1 Code First and am loving it for development, but with only an end plan and a rapidly changing feature list, I am constantly modifying the Class/Database to meet the applications needs. In development, there is no live data and I can easily just delete the entir...
I have come across this several times when selling a prepackaged solution. Customer buys the package, which clearly sets out that it can do XYZ, but the customer wanted it to do ABC. The customer then emails for support. I inform the customer that the product was never designed for the purpose they had in mind (in...
Many applications include 'static data': data that doesn't really change during the lifetime of the application. For example, you might have a list of Sales Areas that is likely to be a fixed list for the foreseeable future. It isn't uncommon to find this static data in a database table (often because you want to refer...
I see the following code pattern all over the place in my company's codebase (.NET 3.5 application): bool Foo(int barID, out Baz bazObject) { try { // do stuff bazObject = someResponseObject; return true; } catch (Exception ex) { // log error return fa...
I work in healthcare IT, reviewing data management processes of various observational studies. One problem I have repeatedly faced is the poorly encoded data, especially when some values are missing. Background, skip if you like I am currently reviewing a study which collects data on patients suffering from a specific...
You are free to use BSD licensed code for anything, even commercial, closed source software. How is that any different than just releasing it as public domain?
when they say that a project is open source (i.e. LifeRay) does it mean that I can take anything I want from that project? I want to use some of the icons used in LifeRay portal for my own (commercial) apps. Is this legal?
Despite what it might look like this is a serious question. After that story with Android OS and Chrome browser submitting to Google the details of the WiFi access points they see in the neighborhood which has nothing even remotely to do with their main function I'm inclined to expect everything. But the specific quest...
I am about to be a new college grad and I am trying to get an internship or a jr software engineer position. However, I have no experience at all in the field. All I will have is my degree and my in class projects that I have completed. How can I make my resume more attractive so that I can get an interview? Also, how ...
I have two issues with Scrum in embedded systems. First, there are many tasks to do, especially in the early stages, which are not demonstrable. We started with a development board, no OS, no display, no serial communication, etc. We didn't have our display for six sprints. The first four sprints were: Getting the RTO...
Many, many years ago, when I was young and naive and wrote everything from scratch unless it came with the language, I was working for a company with two sales people in two locations who were trying to share leads and contacts. I had just discovered a shiny new hammer, PHP, so of course I built them what I would today...
We have a legacy system with data stored in a SQL database. Several clients connects to this database using a web service. The web service expose a lot of "commands" to query the database and to "do" operations. So far, so good. However, new operations need to be added and the web service cannot be extended. We can add...
I have a turbogears app that I am bringing live that uses a postgresql DB on the back end. From a performance issue am I better off having the DB and app on separate server or on the same server? If on the same server and I better off having the DB on a separate physical drive?
Google translates '早请示晚汇报' as 'Consult early and late reporting' or 'Ask for instructions to report back later'. Bing translates as 'Early and late reporting'. Some translated content: The politics invaded all aspects of daily life during the Cultural Revolution, as 早请示晚汇报. Every day at a political activity or ceremon...
In my current company, in all software projects I've been in, there's usually a phase at the end of a project that eats some good amount of time and is dedicated to polishing new features so that they're ready for launch. In Steve McConnell's book "Software project survival guide", he advocates doing that after each ma...
I've read in numerous sources that the output of PHP's rand() is predictable as its a PRNG, and I mostly accept that as fact simply because I've seen it in so many places. I'm interested in a proof-of-concept: how would I go about predicting the output of rand()? From reading this article I understand that the random n...
1) Should static analysis tool config be placed in source control? This config is not needed to compile/run software and some developers can have different preferences (even within coding convention). On the other hand placing such config in source control and declaring static analysis tool as "official part of project...
By day, I'm a PowerBuilder developer. By night, I dream of being a .NET developer. Sure, I can self-teach mostly everything I need, but I also love classroom learning and 'earning' my education. I am considering 'attending' the SetFocus course for .NET development. My hesitations? It's expensive. Anyone? Feel free...
In Google App Engine, you can upload up to 10 different versions on your appspot project. For instance, if I have a project called example, the URL would be: http://example.appspot.com Each version I upload is given a version string. Possible examples are: dev 1 1_2 staging anystring To access a specific version, I ...
There are many approaches to how to structure a company's IT shop to better fit the needs of the core business. In my scenario, developing web and mobile access is central to the the needs of the organization of which I am thinking. It is structured such that development is done by one group of worker bees, another f...
If you have the time and resources, what would be the most effective way to increase your salary as a full-time programmer, outside of just doing your job? By "salary" here, I mean salary (adjusted for location cost-of-living) coming from a single programming job.
As a senior member of a software team that, unfortunately, has little documentation for legacy reasons, what are the things that one could do to make a new hire comfortable? I have been planning debug sessions with the person on specific defects/feature requests to get him/her acquainted with the code base. However the...
Open source PHP shopping carts platform/framework occupy most top list. They are hot, and we want start quick. So, we are going to make decision between Magento and Opencart, PHP programmers would be happy to this end. While my Java programming colleges feel not so happy, they were selling Broadleaf commerce or JadaS...
I have little experience in website programming. However, I have an idea for a website that I would like to make real. It would have many of the same features that a site such as TripAdvisor uses, but obviously on a smaller scale, and its main feature being a user rating system. Whilst it would be ideal for me to lear...
In open source jargon, is a "committer" someone who creates a commit that gets accepted into a project, or is a "committer" a gatekeeper who decides what commits/patches are or aren't accepted into the "blessed" repository?
Days before, I created Question, Quiz, and Main classes. One Quiz has one or more Questions. From the main class I first create Question objects (the constructor accepts an array of numbers). The Quiz is like when I display the questions I omit the last number of the array and the user will try to figure out that numbe...
I read the following on the MSDN: Use Pascal casing for all public member, type, and namespace names consisting of multiple words. Note that this rule does not apply to instance fields. For reasons that are detailed in the Member Design Guidelines, you should not use public instance fields. Use camel casing for parame...
If you had a task that you wanted to run only once on a cluster of servers, at a regular interval what would be the best way of achieving this? The definition of cluster in this case is 2 or more identical servers with distributed sessions sitting behind a load balancer. Use Case: You have a task that is expensive to r...
We have a web application that gets deployed to multiple regions around our state. An instance of the application for each region. We maintain a staging and production (master) branch in our repository, but we were wondering what is the best way of maintaining each instances codebase. It's similar at the core, but we h...
I've seen people (who generally write good code) directly alter the $_POST array with code like this: // Add some value that wasn't actually posted $_POST['last_activity'] = time(); // Alter an existing post value $_POST['name'] = trim($_POST['name']); // Our pretend function // Pass the entire $_POST array as data t...
EDIT: This is about where the users will have their files, and TEST their changes - a development server so they can edit, save and then refresh a page to see whats changed. I am currently looking over our systems we have in place, here we have 2 internal developers, and 2 designers. All 4 used the same server for dev...
Inspired by this question, I have looked into user groups within my area in England, and there does not seem to be one at all for a few hundred miles. I would like to look into the possibility of setting one up in a local city, but I have no idea what the format should be. My questions are: What is the purpose of a u...
What are the reasons for putting the generated files in a tree parallel to the source trees? For example, in Eclipse I usually choose to put the sources to .../src and the compiler generated files in .../classes. Mixing both in a single tree looks dirty to me, however I can't find any advantage in the separation: Theo...
What exactly is Zend's relationship to PHP? I don't mean the framework but the company itself. Are they the gatekeepers or guardians of sort? I've just been reading up on PHP, and other than requiring knowledge of C to extend it you apparently need to learn the Zend APIs. But when you first start out with PHP you don...
Ok, I don't get it. What does "Oracle owns Java" mean? Google is definitely using Java in Google App Engine, does that mean that Google have to pay Oracle for doing so?
I'm currently assessing Google App Engine, and one of the answers from Hidden limitations of Google App Engine? stated: Performance will surprise you. GAE is optimized for many tiny queries and you get warned if a query takes any CPU time at all. You get 6.5 (at last check) free hours per day, but it's a mys...
I'm a newb to cocoa programming and looking around in various open source code online I see things like: #pragma mark global variable declaration and I was wondering what the meaning of "pragma mark" is in that is it any different than a // or /* (comment) block..like is it used throughout the program, and is there a ...
I have developed a fully functional tool which I would like not only to share with anyone interested but also get support from the community. This tool is cross-platform, written in C++ with Qt, the code is well commented but I still lack any documentation. There are also some small issues and improvements to be made b...
I've read: IaaS, PaaS and SaaS Terms Clearly Explained and Defined and Cloud Computing – Demystifying SaaS, PaaS and IaaS And I've got 2 questions: Is Google App Engine considered PaaS or IaaS? Is HaaS a subset of IaaS or is HaaS really just another name for IaaS?
There are a bunch of questions on Stack Overflow about whether AJAX should return JSON or HTML, and most seem to agree that it is ideal to return JSON for the sake of speed. However, that means that if I degrade gracefully, I will have some duplicate code because I am generating the same markup in both PHP and Javascri...
My users all have Windows. Some of them use Linux or a Mac, but if they do they're generally capable of using something like Mono, Wine, Parallels or dual-boot. My development team (including myself) has extensive experience both in writing Swing applications in Java as well as Windows Forms in C#. "Extensive" means we...
Given something like this: 1 5 3 4 = 18 I need to determine (using an algorithm) if there is a combination of operators and brackets that bring me to 18. Only "+" and "*" and "(" and ")" are allowed. Example: 1 + 5 + ( 3 * 4 ) = 18 Beside brute force, is there any particular algorithm that is able to compute all the po...
I've spent too much time on setup & maintain a development server, which contains following tools: Common services like SSH, BIND, rsync, etc. Subversion, Git. Apache server, which runs CGit, Trac, Webmin, phpmyadmin, phppgadmin, etc. Jetty, which runs Archiva and Hudson. Bugzilla. PostgresSQL server, MySQL server. I...
I want it will be native code generation // Able to compile with something like GHC cross-platform (win / linux) Functional and a bit object-oriented lambdas, pattern matching, tuples and other functional stuff Great metaprogramming support Indent and minimum borders static typing also I want Mixin support :) possibi...
I’ve been looking at various asynchronous resource-loaders and I’m not sure which one to use yet. Where I work we have disparate group-efforts whose class-modules may use different versions of jQuery (etc). As such, nested dependencies may differ, as well. I have no control over this, so this means I need to dynamicall...
When we say that "Dennis Ritchie developed C language", do we mean that he has created a compiler (using an 'already' developed other language) which can compile the source code written in C language? if yes, what was language he used to write first C compiler? I understand a compiler is a program and we can create an...
How exactly is portability of a language like C is determined? I've learned that compilers are ISA specific. If this is true, how is C portable? Or is it that just the source code written in C is portable but not the executables? Aren't the executables ISA specific for examples applications for x86 are separate from th...
I have a dilemma. I have a candidate for a senior software developer position. The guy seems competent on a first talk with him and he answered the questions asked precisely and gave me proofs of his work. Moreover he has been highly recommended by some trusted colleagues. In this case I am tempted to skip the techni...
I have seen a lot of people claiming themselves to be a "software consultant". These consultants do what a normal software developer does, write code, estimate tasks, fix bugs and attend meetings etc. The only difference being the financials, consultants end up earning more. Then how is a software developer different f...
Is it possible to generate every possible combination of a 32 character alpha numeric string? If so, how long would it take on today's fast computers? My lecturer at university said it's impossible, and I thought "nothing is impossible". Any ideas on how long it'd take and how it'd be done? We're using Java at the mome...
As a Java programmer, I'm looking to learn either C or C++ by writing a database manager. Obviously, Java shares many idioms with C and C++, but yet both bring vastly different program design challenges. I'm looking to for a way to make this exercise as educational as possible. What aspects of taking on this project ...
I've been reading over some proposals for software projects recently and I'm a little concerned by what I've seen. Often I feel that proposals have been rushed and/or poorly thought out. It's very possible that proposals don't need to look like a basket of fruit, but if your pitching for work or seeking approval for fu...
Microsoft (through the Student Insider program) has generously flown me out to Microsoft TechEd North America 2011. It seems like the website suggests that one should just make a schedule of the interesting talks, and that's that. However, it seems like several people don't spend much time in the talks and spend the ti...
In my application I want to use a mixture of several algorithms described in some recently published scientific papers. But I have some legal questions. Q1 If an algorithm was published in a scientific paper, and the authors were affiliated with academia not some private company, can it be protected by a patent at the ...
I was curious, what other architectures exist for business or user focused development that aren't written using web applications. Are these architectures used today? If you are or were in the business world and you need to connect to an application from a remote location, what technology would you use (that isn't web...
I'm in a student team that is focusing on web development. My teammates are interested in Python and I'm the only one that has learned it, so I was asked to give an "introduction to Python" talk next week. I'd like to listen to your advice about what to talk about to make the talk interesting instead of just a bunch of...
Due to the requirement of a project we had to develop a data interchange format with a built in data types. The format served the purpose well in the scope of that project. But I was thinking that does it have any advantages of having a built-in type system (int, long, bool, string etc.) in a more general scope of data...
What is the best way to explain floating point rounding issue to customers? I know http://download.oracle.com/docs/cd/E19957-01/806-3568/ncg_goldberg.html as well as the entries in the C++ FAQ and various other pages aimed at developers and scientists, but is there a web page, article or explanation, aimed at "regular"...
I was wondering who owns the copyright of the sourcecode if you port an opensource project from one language to another. Is there a clear answer, or does it 'depend'? edit: I'm aware that a license choice is bound to the license the original sourcecode is released under, but I'm strictly wondering about the IP/copyrigh...
Random.org provides 200k free random bits (only 6250 32-bit integers!) from the analog world (cf.) per IP per day. Does anyone know of an alternative web service that provides more on-demand random bits per day? (paying is OK as long as the price is "within expectations" of 1000×1024bits per usd cent) (random.org's pa...
Do you find writing dead code useful? Some says "If you have 2 logic to do some operation then instead of making other logic code commented or removing code make it dead code as it will not affect the operation." Example:- if(true){ // logic - 1 } else { // logic - 2 // dead code } Is it true? I usually do n...
I'm a student (yet to go to uni) and I've been programming for about 5 years now. Over that time, I've flitted around from language to language, from API to API, and project to project. I've tried setting myself on one thing, but I lose interest. My entire PC is full of half finished projects (and at least four times a...
One of my colleagues has suggested timing how much time each team member spends on each user story. This seems to me likely confusing for the dev team during the iteration, and misleading as a metric for story estimation in future planning meetings. Do any of you have experience with such a system and any thoughts on ...
I just noticed something and I wonder if there is any reason for that. Except for C++ (std::priority_queue is a max heap), I don't know any other language that offers a max heap. Python's heapq module implements a binary min-heap on top of a list. Java's library contains a PriorityQueue class, which implements a...
What would you do in a situation where a team member tries to take responsibilities are not initially assigned to him but to the Scrum Master?
I am in the process of trying to identify a suitable project for my final year at university. How important is it that the project be unique? I really want to do a project with the Kinect and am eagerly awaiting the official SDK. As yet I am struggling for an idea. However, I have looked at kinecthacks.com to see wha...
I work at a bank and I developed an in-house web application that helps keep track of past due loans and all the interaction between the bank and the customers. I was recently told by an outside consultant, who frequents many different banks, that each one of these banks would die to have a loss mitigation system like ...
There are many sites on the Internet that require login information, and the only way to protect against password reusing is the "promise" that the passwords are hashed on the server, which is not always true. So I wonder, how hard is to make a webpage that hashes passwords in the client computer (with Javascript), bef...
What do you think? Is "Visual Studio Lightswitch" becoming the "Oracle APEX" for SQL Server in the futrure? Are these two technologies comparable?
The Java Community Process is meant to be just that. A process where the Java community can have its say on the future of the language. What is the best way to get involved in the JCP? A JSR (Java Specification Request) goes through various stages in its life cycle. Obviously if you are domain expert with deep knowledg...
I was recently approached by a software firm that specializes in Quality Assurance and Testing. Up until this point, the developers at our (small) company have been responsible for their own QA for the most part and we've had mixed results. We're at the point where we are ready to hire a full time QA guy, but I was cur...
Having "completed" my task, I have recently been assigned by my PM to work on a maintenance project by another PM. In this other project, the client wants to add new features and I'm assigned to do a feature. I'm finding my job over my head for various reasons: code is difficult to understand/read as not well-documen...
Why don't some open source libraries provide binaries? I have noticed that some projects defer to third-parties who maintain current builds of the software, especially for Windows builds. I ask because it seems like a barrier for adoption of a library. It's more work for the developer since he must set up his environme...
I have written a bunch of fun for me projects and have shown them to friends and such. Is there any value in doing the work and making these projects open source since the interest and usefulness limited.
The codebase I work with daily has no automated tests, inconsistent naming and tons of comments like "Why is this here?", "Not sure if this is needed" or "This method isn't named right" and the code is littered with "Changelogs" despite the fact we use source control. Suffice it to say, our codebase could use refactori...
I thought LGPL was a permissive license, just like MIT, BSD or Apache. But today I read, that only linking to LGPL (libraries etc) is allowed from closed-source code - other than that, it's copyleft - so I have to publish code that is based on an LGPL program. I created a program for my employer that is based on an LGP...
I'm wondering if it is worth reading language specifications/standard documents (e.g. The Java Language Specification) if you aren't going to write a compiler/interpreter for the language or something similar? I understand that reading such a book shouldn't be anyone's first exposure to the language, but it could be a ...
For my Semester project I have to go for any Adaptative Interface Design. My language is C# and I have to Use OpenTK (wrapper for OpenGL). I have an idea that I should show two points and some obstacles and my subject (user) would drag an object from one place to the final place avoiding the Obstacles. Also (s)he can p...