instruction
stringlengths
34
36.1k
I'm writing a small database-centric application in Java Swing that will be used internally in a small company. I haven't much experience with developing production-level applications. I don't use an ORM, just a few simple methods that run SQL queries with Java JDBC. On every method that access the database I use a try...
I develop a web application and we test it on several browsers, including Firefox and Internet Explorer. During our development we tested the application on Firefox 3.5.2 and our testing team tested the same on 3.5.6 and found the UI looks good. Once in production, though, we've started receiving client complaints that...
Why are there so many programming languages? And what prompts someone to create a programming languages in spite of the fact that other languages already exist?
This happened at least once to me. I'm working on some part of the code base and find a small bug in a different part, and the bug stops me from completing what I'm currently trying to do. Fixing the bug could be as simple as changing a single statement. What do you do in that situation? Fix the bug and commit it toge...
Possible Duplicate: What good book shoud I buy to learn Agile from scratch? It seem that Agile for the solo developer is a good idea. But how to learn it? Is there any good book, web reference or course that a solo developer could start from?
Developer interviews are different than most other places, because not only do you worry about the people you work with, benefits, job description, etc., you also have EXTRA to worry about after getting the job. Writing two application with exact requirements can be vastly different if you're working in a loud vs quie...
Is Java becoming the de facto standard from Linux application development in the same way .NET is the standard for Windows application development? If not why not?
We currently use once cc.net server for our build process, which builds both .net (using msbuild & nant) and java (using maven and ant). CC.net monitors source control, and triggers a remote build running on a separate server. CC.net then collates the results. When we run the remote build, it typically: runs nunit...
Perhaps the greatest promise of using object-oriented paradigm is the code reuse. Some dispute that this was achieved. Why was it (not) achieved? Does code reuse as OOP defines it, make projects more productive? Or more manageable? Or easier to maintain? Or with more quality? Probably we all agree that code reuse is a ...
What coding standards do you think are important for .NET / C# projects? This could be anything from dealing with curly braces and spacing and pedantry like that. Or it could be more fundamental questions such as what namespaces in the .NET Framework to avoid, best practices with config files, etc. Try to avoid creat...
I am curious about experiences of programmers who have gone beyond college or university and now work in the industry. I am not talking about academia (you need PhD there anyway). Do you have a Master's degree? Has it helped your career? Are there any other benefits besides the knowledge one gains while pursuing the de...
When dealing with complicated algorithms in languages with support for nested functions (such as Python and D) I often write huge functions (because the algorithm is complicated) but mitigate this by using nested functions to structure the complicated code. Are huge (100+ line) functions still considered evil even if ...
I'm looking at licensing some open source software and am looking at the GPL. What are the pros and cons of using this license?
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration -- Edsger W. Dijkstra I have deep respect to Dijkstra but I don't agree with everything he said/wrote. I disagree specially with ...
I tried programming Scala in Netbeans and Eclipse, but it is not what I'm looking for. In Netbeans suggestions for method names etc. are not working. In Eclipse I can't go to some classes sources by pressing F3. (e.g. scala List). Is support in IntelliJ IDEA any better? Are there other IDE's supporting Scala?
In the comment to this great post, Roy Osherove mentioned the OAPT project that is designed to run each assert in a single test. The following is written on the project's home page: Proper unit tests should fail for exactly one reason, that’s why you should be using one assert per unit test. And, also, Roy wrote in c...
I like the GPL license but the project I'm working on is a more general purpose one that will be used inside other programs. It doesn't run independently like a CMS or application would. So I'm looking around at other projects to see what they've done. JQuery has an interesting MIT/GPL license Zend framework has New B...
I'm two months away from getting my degree in systems engineering, which is to say, I learned how to code and code well using managed languages. The only reason I got into this career was because I wanted to create video games. I know now that with my current skillset, I won't be able to create some of the things I hav...
As a solo developer, I think I'm using an Agile-like process, but I'd like to compare what I'm doing to real Agile and see if I can improve my own process. Is there a book out there that's the de-facto standard for describing best practices, methodologies, and other helpful information on Agile? What about that book ma...
I know we've covered what questions you should ask about a company before you would decide to work there. But what do you do with the answers? In other words, what would you consider a dealbreaker? I.e. what would scare you so much about a company that you wouldn't work there, even if everything else was great? For e...
How do you endorse/support a code project that you find helpful, be it established, emergent or fledgling? I think there are some obvious answers, but hopefully there will be some novel suggestions too.
I have been offered an interesting job, but there's a big caveat for me: they use pair programming. I hate the idea of pair programming, and I'm probably not suited for it: I like to do frequent pauses, I hate to see someone programming (I would constantly poke the pair away to code myself), I have to be in full contro...
No one's perfect, and no matter what we do, we are going to produce code that has bugs in it from time to time. What are some methods/techniques for reducing the number of bugs you produce, both when writing new software and changing/maintaining existing code?
I'm a student of computer science but I am only taking entry level web development classes. I'm looking for some out-of-class reading, tutorials, and other ways of learning but I'm not sure what I should start in. What is a good set of programming languages (different paradigms?), frameworks, suggested projects, and m...
I have been listening to Scott Hanselman and Rob Conery's podcast, This Developer's Life. In the latest episode, they discuss personality traits: 1.0.4 - Being Mean. What makes people mean in our industry? What about aggressive? Confident? What's the difference? Would you rather have a drill sergeant for a bos...
During iteration retrospectives on agile projects, one of the topics that comes up most often for us is that the product owner is (or product owners are) not available or engaged in the project at a day to day level. It seems to be a common theme that customers are unwilling to "give up" the necessary amount of their ...
Console app (my favorite), quick & sloppy form, MS Paint (for GUI); what works best most of the time for your standard application? why?
In an open source project, a number of other open source libraries have been included to implement needed functionality, some as libraries (LGPL), and some as source code (non-LGPL). The new BSD license was selected for the project. The included open source libraries are licensed under the new BSD, MIT, Apache, and LGP...
If I would start to focus on the .NET platform and be self-employed, then I probably would like to have some Windows 7, Windows Server 2008, Visual Studio 2010 licenses just for the development environment and for testing, and then a few licenses for the production environment (a Windows Server 2008 Web) and added to t...
Question first: What are some feasible alternatives to time tracking for employees in a web/software development company, and why are they better options Explanation: I work at a company where we work like this. Everybody is paid salary. We have 3 types of work, Contract, Adhoc and Internal (Non billable). Adhoc is jus...
What are some somewhat common math formulas you learned that helped you write better algorithms and become a better programmer? Example: I learned about the ecludian distance formula: sqrt((x1-x2)^2+(y1-y2)^2) which helped me understand how to find like objects by comparing 2 factors.
As I've implied through my other posts, I'm still fairly new to the workforce. During team meetings, I tend to be able to keep up with technical discussion, but when my project manager starts talking about how we've won a new contract, or we're involved in a new proposal bid, or... anything that's business rather than ...
So I know everyone here is all about private offices, how many developers actually have them. I am sort of half skeptical. I can believe that lead developers have them, but that's normally just one person in your average office. That makes me wonder, how many developers have private offices. Which leads to the actual q...
I'm a self-taught programmer and have just started a computer science degree to supplement my knowledge and fill in the gaps. However, I'm already debating the direction of my education. I want a 4 year bachelor's degree for sure, but after that, I'm not sure: Is it worth it to get an M.Sc? What about a Ph.D.? What opp...
In what circumstances should an IT Consultant encrypt their hard drive to protect their code/data of their clients? I am thinking that if it does not add much to your work load you might as well use full disc encryption with a 'weak' password to at least prevent someone from accessing your email files and other documen...
Looking at common Agile practices it seems to me that they (intentionally or unintentionally?) force developers to spend more time actually working as opposed to reading blogs/articles, chatting, coffee breaks and just plain procrastinating. In particular: 1) Pair programming - the biggest work-forcer, just because it...
I work at a company where we have a lot of different skillsets in the development team. We do all of the following (generally geared towards web): .NET (MVC, Umbraco, ASP.NET, Surface) Java (Spring, Hibernate, Android) PHP (Zend, Code igniter) Actionscript 3 AIR Objective-C Html/Javascript (obviously) We're trying...
A recent question on stackoverflow provoked a discussion about the immutability of primary keys. I had thought that it was a kind of rule that primary keys should be immutable. If there is a chance that some day a primary key would be updated, I thought you should use a surrogate key. However it is not in the SQL stand...
I am rereading Refactoring by Martin Fowler. In Chapter 4, Building Tests, I came across the following passage. In fact, one of the most usefull times to write tests is before you start programming. When you need to add a feature, begin by writing the test. This isn't as backward as it sounds. By writing the test you a...
I just sent out emails to five local web design companies to my area asking to take drawings to HTML/CSS/jQuery. None of the ones who accepted the deal seem suitable to myself. Others rejected the offer because they wanted to 'provide an end-to-end solution' or are 'booked till June'. The local companies did not seem s...
I'm developing a statically- and strongly-typed, compiled language, and I'm revisiting the idea of whether to include function overloading as a language feature. I realized that I'm a little bit biased, coming mainly from a C[++|#] background. What are the most convincing arguments for and against including function ov...
I'm currently writing a load test for a cache which should test how a cache will react to persistent requests. A colleague and I had differing opinions on how this load testing should be performed. I believe that a load test should be as random as possible. It should model real-world load as much as possible, and the w...
What was a project or spec that got put on your desk that could not possibly be done? How did you explain the dilemma to the "requester"? More importantly, did they understand after you explained the fundamental issue?
My management just asked an unprecedented question in my (admittedly brief) history with the organization: "What can we do to help you?" Simultaneously, we're working several big projects for a fairly new client whose ability to push requirements around mid-project is legend. Developing for these guys is like tap danci...
In my experience, software developers tend to wear multiple hats and fill multiple roles with different responsibilities. From not only coding, but sometimes also writing SQL, designing the user-interface, designing the database, graphics manipulation, to even QA testing. If the primary role is to write software/code,...
This might be slightly off topic, but I'll risk it, as the site is about Programmers ! Programmers are good at constantly learning new programming languages, but how good are they at learning a new spoken language ? Have you taken up a foreign language (French/Spanish/etc) as an adult and mastered it? Was it easy? I as...
I really like using ClassNames and memberNames as convention but I am not sure how I would name the file containing a class. I like making my classes defined in a file with the exact same name as the class. But I also like making php files all lowercase. So I am conflicted. If I have a class called ProductGroup should ...
The article "Promiscuous Pairing and Beginner’s Mind" (PDF) suggests that you put someone in the pair that knows the least about the particular area of the code base. It also suggests that you swap out the senior member of the pair every 90 minutes or so. Not only will the newbies learn about that area of the code but...
Many developers recommend Firefox for web development for a variety of reasons. But, after looking at Opera, it seems to me that Opera has all of the same web development functionality that Firefox has built into it. So what is wrong with Opera for web development?
In a book I'm reading there is a chapter on documentation for your code. The book is about PHP and described some easy methods but also going for some complicated and time consuming methods (xml, xsl) like DocBook. At my current small company (5 people) we even rarely write comments, but I'm wondering if in a big compa...
I've had an argument recently with a fellow programmer. He was interviewing for a new position and was asked this question: Give a sequence of numbers starting at X and ending in Y but with one element missing so N is Y-X-1, find the missing element in O(N) or better. Now, the answer is irrelevant here (but int...
I'm looking for something that allows me to work out an algorithm on a computer similar to how I would do it on a whiteboard. At work, I have a huge whiteboard that I can use for this, but at home, I don't (and can't). This makes it difficult to design algorithms when I'm working on hobby projects. I think better when ...
I have a Java class that handles import and export of data. It started out as a simple private void export() { } private void import() { } Of course, I wrote the export first, committed it, and then went on to write the import. But import is a keyword in Java - I can't use that as a function name. So I go back and ren...
Which way is more beneficial and productive?
After 15 years of C++, I've still haven't learn to love using const. I understand it's use, but I've never actually been in situation where being const correct would have avoided the problem I was facing. So how did you come to love benefits of consts?
I was having a chat with a coworker who is working on a polling app and framework. He was asking technical questions and I suggested he open source the application to get more quality opinions from developers who are interested in this problem and are willing to give it heavy though. He has a different point of view w...
For someone with .Net experience and wanting to develop for iPhone/iPod/iPad, is it worth learning Objective-C? Is MonoTouch a good alternative? What are some of the trade-offs when using MonoTouch vs coding in Objective-C?
I'm currently working on throwing together some basic prototypes, partly to gather requirements and partly to design the final UI. At the moment I'm trying building up the screen using Post-it notes, with yellow notes for information and pink for actions (buttons or menus). The idea being that you can easily move, rem...
Obviously the size of the project you're working on will be a huge factor in how long you spend writing the design document/specification. But do you go through everything, picking out every tiny detail? Or do you take a more agile approach and start writing the software quite early on and solve the problems as they c...
Loose coupling is, to some developers, the holy grail of well-engineered software. It's certainly a good thing when it makes code more flexible in the face of changes that are likely to occur in the foreseeable future, or avoids code duplication. On the other hand, efforts to loosely couple components increase the a...
SQL is officially pronounced as /ˌɛskjuːˈɛl/ like "S-Q-L", as stated in Beaulieu, Alan (April 2009). Mary E. Treseler. ed. Learning SQL (2nd ed.). Sebastapol, CA, USA: O'Reilly. ISBN 978-0-596-52083-0. But often it is pronounced /ˈsiːkwəl/ like "sequel", what is the history behind this second pronunciation?
When you are defining a function/variable/etc and are not sure what to name it, what do you name it? How do you come up with a name? If you use a temporary name as a place-card until you give it it's real name, what temporary name do you use? update I have been using things like WILL_NAME_LATER, NEEDS_NAME, or TO_BE_N...
We're integrating Mercurial slowly in our office and doing web-development we started using named branches. We haven't quite found a good convention as far as naming our branches though. We tried: FeatureName (Can see this causing problem down the line) DEVInitial_FeatureName (Could get confusing when developer c...
I'm not sure if I'm using the correct term, but would you program using High-level abstractions like Powerbuilder, or some CMS like MODx or DotNetNuke? I haven't dabbled in any of these yet. The reason I'm asking is that I kind of feel intimidated by the whole notion of using any abstraction over the languages I'm usin...
Here's a bit information about me, before starting with the question. I am a Computer Science Undergraduate, Java being my primary coding language. The basic problem in my University are the teaching standards. No one is concerned about teaching coding knowledge to students, rather than just theoretical knowledge. The ...
Quote from Wikipedia of the article "High-level programming language": A high-level programming language is a programming language with strong abstraction from the details of the computer. In comparison to low-level programming languages, it may use natural language elements, be easier to use, or be more portable acro...
Disclaimer: I by no means condone the use of pirated software. Have you ever witnessed the use of pirated software for development purposes? May be a company didn't have enough money to buy a piece of software and there were no free alternatives? May be a company wanted to try something out before buying and there were...
I was browsing through this talk about "Historically Bad Ideas" over the history of Computer Science, and found an interesting presentation about the rise & fall of the Java Enterprise initiatives. Slide #16 grabbed my attention by suggesting that Container Managed Persistence is a "naïve ORM solution". Of course, I as...
Assuming I've found an open source project I'm interested in, how do I evaluate the project(the members, the activity level, etc) to determine if joining the project will be a good use of my time and energy?
Interested in knowing from the more experienced ones if someone can find a job as a programmer without even a highschool degree. Consider the said person to be an average programmer. Would someone even consider giving him/her a chance on an interview ? The languages of interest would be python/php/java/c# Please answer...
So the other day my boss (let's call him Colfax) asked me to work on a project, but that I should not discuss it with anyone (including the other programmers on my team) and that it would have to be done outside of normal work hours. In exchange, Colfax offered me "off-the-book" vacation days equal to the hours spent o...
I've been using SVN for sometime and have been making an awkward, but soon to be rewarding transition over to git. Theres quite a few side / small projects that I'm working on which 90% will never see the light of day. As well - I also have my weekly school assignments / projects, and finally client projects that I hav...
After working out a project, it might require too much tweaks and changes to get it working right... What can I do to prevent this?
If you are a solo developer, or have a leading role in a software company, you might have to decide how much your software will cost one or another day... What is your experience with calculating how much your software costs for your customer? Why does this method it work for you?
Are there ways to unit test your multi-threaded code for race conditions and deadlocks? To see if they are performing the way they should be...
This isn't about the typical naming conventions, where to place your comments, should we use regions, etc. This is about a coding standard that discusses specifics on how a programmer should design his applications. Stuff like: (on a .NET app and not in the exact wordings) Make as few classes possible Classes should ...
I don't know if it's just with me, but when I start refactoring some code I waste a lot time doing that and it never ends. Every time I read the code again, I find something that can be improved, code refactoring is like my brain into a infinite loop and the end conditional is reached randomly with no satisfaction. So,...
Functional programming is one of the oldest programming paradigms. However it isn't used much in the industry compared to more popular paradigms. But it have largely been emphasized in academia. What's your strongest opinion against functional programming?
I have been running my own home-based server for ages for my own personal code, and have tried one system or another (SVN, VSS, etc). But recently, I've enjoyed having some more precious (no source code) data off-site, without having to constantly worry about backups in case of hardware failure, using services like Dro...
My team uses a Kanban system for tracking day-to-day progress and it's worked out really well for understanding progress on features (captured as user stories). We have largely allowed our system design to emerge as we develop features which worked out well until recently. In the last two week we've had several discu...
I have an external java application which use JDBC as to reach a MySQL database. This will be used by many people and is going to store all the people's data on the same server / MySQL. As I bet people will be able to crack the .jar and see the source, I expect them to be able to cheat the program by editing it and mak...
I am curios to use .NET for some web applications (e.g. ASP.NET MVC 2). However my budget is limited so I would like to use Mono on Linux. I have never used Mono before, and I haven't read about any bigger sites that is using Mono+Linux on the server in production. What's your experience using Mono on Linux in producti...
F# and Scala are both functional programming langugages that don't force the developer to only use immutable datatypes. They both have support for objects, can use libraries written in other languages and run on a virtual machine. Both languages seem to be based on ML. What are the biggest differences between F# and Sc...
As a programmer, do you see any professional or other advantage in using your real name in online discourse, versus an invented handle? I've always gone by a single username and had my real name displayed whenever possible, for a few reasons: My interests online are almost exclusively professional and aboveboard. It c...
I have done much development in Java using Eclipse, and now I have started to use Visual Studio for .NET development. So far I find the IDEs to be able to do the same things, but just different. What features in Eclipse isn't available in Visual Studio?
What are some strategies, methodologies and best-practices for managing a distributed team? What can be done to encourage and enforce communication between the various team members? Is it possible to adapt/implement existing agile development methodologies over a distributed team? Related but not identical: https:/...
What do you do when malloc returns 0 or new throws exception? Just halt or try to survive OOM condition/save the user's work?
Possible Duplicate: I've graduated with a Computer Science degree but I don't feel like I'm even close to being an expert programmer I recently graduated from university, and I have since then joined a development team where I am by far the least experienced developer with maybe with a couple work terms under my bel...
I'm interested in learning Scala, but due to is relative newness, I can't seem to find a whole lot of books about it. Is there a book out there that's the de-facto standard for describing best practices, design methodologies, and other helpful information on Scala? What makes that book special?
There are times when I am working on programming project and I get the itch to change some stuff in my environment (OSX or Linux). Vim might not being doing exactly what I want, so instead of doing it the round about way I've been doing for a couple months (sometimes years) I go and figure out the right way. Or I may b...
I've heard it argued that design patterns are the best thing since sliced bread. I've also heard it argued that design patterns tend to exacerbate "Second System Syndrome," that they are massively overused, and that they make their users think they're better designers than they really are. I tend to fall closer to the...
Sometimes, I see potential in a new technology eg. AIR (not new but I haven't tried it much), and I play around with it. After sometime, I feel inspired to try a new personal project out of it. It was during this project that I sometimes find another "tech" eg. Silverlight more suitable. Maybe its easier to get somethi...
Requested re-post from StackOverflow: I'm working in a small development time with very limited time for development. We develop a tool that is important for the result of our work, but not used daily. I am the only person in the team that has a background as a programmer. My problem is that I have been pushing for cod...
Sometimes an algorithm can be written in two ways: The short, fancy way; or The longer, easy-to-understand way. For example, here is a longer, easier way of copying a string source to dest in C: *dest = *source; while (*source != '\0') { source++; dest++; *dest = *source; } (true); And here is a short, f...
A quality what I would like to develop is to write more concise code. With writing more concise, at least in my opinion, the opportunity to add bugs to the code is smaller. It is easier to read the code for other. My question is if it is something that just comes with experience or is it something you can do explicitly...
Thought I post this to the best community of programmers I know. David Johnston, the new Governor General, has the digital world confused. Just what is the meaning of that 33 character-long string of ones and zeros that is emblazoned across the bottom of his fresh new Coat of Arms? According to the GG's we...
Lisp obviously is an advantage for the AI stuff, but it doesn't appear to me that Lisp is any faster than Java, C#, or even C. I am not a master of Lisp, but I find it incredibly difficult to understand the advantage one would get in writing business software in Lisp. Yet it is considered as a hacker's language. Why do...
One of my colleagues likes to use automatic code generators, which create large amounts of code that is poorly documented and very hard to maintain. Is the cost of using a code generator worth the hassle in maintenance, for the reduced time to creation?
Should a test plan for internal software account for the error states of all possible configurations? Ie: I have an app.config with some file paths. Should the test plan have steps for testing what happens when those values are incorrect?
Right now my supervisor is creating requirements documentation / specs for me using bugtracking software. This seems like a terrible idea to me, all the requirements are on these little tickets and I have to click around on this dumb webform to get at the requirements. What is a sane software solution for requirement...