instruction
stringlengths
34
19.9k
My team plans to deprecate a few methods from a specific library. I do not want to simply remove them, but dont want to return results either from the mehtods that are to be deprecated. What are the guidelines/process I should ideally follow?
As we all know, there is 'alpha', and 'beta' release status. Mozilla Firefox, however, labels its releases differently: 'nightly', 'aurora', 'beta'. Is this an example to follow? Is aurora the new alpha? Does it create confusion, since it is basically public beta testing with a cool name and cool icon?
I can't decide how to refactor code right. Let's say I have a complex hypothetical logic piece: public class ImageService { public void UploadImage(VectorData data) { var image = ConvertVectorDataToImage(); var thumbnail = CreateThumbnail(image); SaveThumbnail(thumbnail); SaveIm...
I'm preparing a LINQ section in interview questions for senior programmers. What are the most interesting questions in LINQ to include? And why?
Almost every advanced programmer says that it's very useful to read the code of other professionals. Usually they advice open source. Do you read it or not? If you do, how often and what's the procedure of reading the code? Also, it's a bit difficult for newbies to deal with SVN - a bunches of files. What's the soluti...
Recently I read the following 5 Types Of Bosses and How To Deal With Them , which describes the attires of the worst boss. I've just started leading a small team of software developers. I would like to know what are the main things a programmer expects from the senior programmer or what are the things we should avoid w...
Most (good) namespace conventions require a company name scoped namespace. eg CompanyName.ComponentName.x.y.z How well does this translate over to web applications? In many websites, the company is referred to by the website name (eg, Facebook, MySpace). Does this convolute namespaces, making them appear as if they can...
Math has always been my thing in that I've always found the subject easy. Computer Science is my second love, though. Given the choice, I would prefer to major in Math. Since the only careers one would usually go into with an undergraduate degree in math are not appealing at all, I would be very content spending my day...
I am in the research phase of a project that needs to make use of 3rd party libraries that are in Java so I am stuck using Java to at least a small degree. I am considering implementing Ruby as the front-end layer. That would leave me with the option of calling the Java classes as a web service by hitting a certain UR...
I am considering using JRuby in a project which would need to talk to some Java. From what I am reading about JRuby I am not noticing that it is missing anything that the standard Ruby has. Is that true? Does JRuby have everything the original Ruby has and also the JVM on top of it? Or is there something missing in J...
It is common for software vendors to offer automatic updates. The research and installation of these updates can be done at application startup through a service or process in the background (which often can be seen in the icon tray) Sometimes at the opening of a session or boot The problem I encounter today is that ...
A couple of months ago I moved to Germany. Taking some projects on my own, I've recently had the opportunity to develop with a company-based framework, that was very well documented, but in German. My German is pretty good, however my programming terminology is somewhat lacking. Long story short, I was wondering, how ...
During one of my studies into the intricacies of C#, I came across an interesting passage concerning explicit interface implementation. While this syntax is quite helpful when you need to resolve name clashes, you can use explicit interface implementation simply to hide more "advanced" members from the object...
Since Visual Studio 2010 does not come with a VB6 conversion tool, the boss wants to use a 3rd party tool (i.e VBUC) that Microsoft is suggesting. Has anyone used one of these 3rd party tools/services? If so, have you found them to be worth the money?
I had a discussion with one of my teachers the other day. We debated the impact that simpler scripting languages (like Python or Ruby) have on junior programmers. He argued that scripting languages engender sloppy coding techniques because beginners don't understand what is going on "under the hood". He also cited ot...
I do some volunteer work with a non-profit organization on the side occasionally. My main area of expertise is ASP.NET, C#, and SQL. They currently rely heavily on an Access database for their day to day operations. One of their technology guys has been looking into Sharepoint as a migration point for their Access data...
C++ templates are notorious for generating long, unreadable error messages. I have a general idea of why template error messages in C++ are so bad. Essentially, the problem is that the error isn't triggered until the compiler encounters syntax that is not supported by a certain type in a template. For example: templ...
I am currently working on the implementation of a new programming language, for fun. I realize that most languages never become popular, but I still want the language to have a high-quality implementation. The language is loosely lisp-like. It supports closures, first-class continuations, a homoiconic syntax, first-cla...
I was asked to make a web application to allow users to query a particular database more easily. Simplifying, this database has only two tables, reports and products. The relationship between the two is that one report may refer to one or more products. The web application should allow users to specify in a graphic way...
How much better is Apache Solr than its non-Java competition? Is it so much better than other solutions, e.g. this one (Sphinx with PHP API) or Zend_Search_Lucene that it would be worth suggesting that a client move to a different hosting provider than the one they are working with now? The current host does not suppor...
Are Chrome Developer Tools an adequate substitute for Firebug? I'm learning how to develop simple web apps using Django. The book I have recommends installing Firefox/Firebug. I'm used to Chrome and wanted to know if I need to switch or if Chrome Developer Tools contain all the essential functionality of Firebug.
I have a situation where some procedure returns an object (kind of like a DTO) with a certain interface: interface ISomeInterface { string StringReadOnlyProperty { get; } int IntReadWriteProperty { get; set; } } (In the real implementation, there are more properties). There are two different places where these...
I'm working on a project where the everything is driven from the a .dll on the server. The UI and the business rules are all on this .dll This makes it pretty difficult to debug. My question is, I would like to present alternatives to allowing the users to the ability to still create customized screens without the UI...
Lets say Alice Co. writes a program, and Bob Co. hires a contractor to copy it, and put it on their platform? What is the general legal recourse in these cases? I say general, because most of us are programmers, not lawyers, and we all understand we're not asking for qualified legal advice. But generally. What happens...
In the perils of java schools Joel discusses his experience at Penn and the difficulty of "segmentation faults". He says [segfaults are difficult until you] "take a deep breath and really try to force your mind to work at two different levels of abstraction simultaneously." Given a list of common causes for...
As I've always liked doing things myself, I chose to code in C++ rather than Visual Basic at university because I could see what was going on and how it worked. However, sometimes I feel like I'm wasting my time though, as there are so many 3rd party libraries out there. Here's an example of what I mean. A while ago...
Unless it is needed to differentiate between a variable and field with the same name, I never put this. in front of a field or any member access in C#. I see this as no different to m_ prefix that used to be common in C++, and think if you really need to specify that it's a member, your class is too big. However, ther...
I know programmers tend to get defensive with their paradigms and tools that they use. But in your experience, with the most generic, typical pieces of code that you see with Java or C++ or C, is the code more error prone than a similar piece of code in an declarative or functional programming language. For example, w...
On page 242 of Code Complete 2, Steve McConnell touts The Principle of Proximity. Put simply, Mr. McConnell advises programmers to keep related actions together. In my case, the applicable emphasis is: It's important to initialize and set variables (and objects) close to where they are being used. It's usually easy...
Are adding gimmicks to a website ever a good idea? What I mean by gimmick is adding "cool" features that solve no real problem. We are currently considering adding a "Magazine style" product viewing application to the site. You know like a flash based app that shows magazine pages that you can click and flip the pages ...
I have a long(ish) function of the following pattern: bool func(some_type_t *p1, another_t *p2) { bool a = false, b = false, c = false, etc = false; a = (some_long && expression && \ (that_deserves | its_own_line)); b = (another || long_expression && \ (that_deserves | its_own_line)); c = and_s...
CAPTCHAs have a lot of downsides, accessibility and user friendliness are two things that are often sacrificed. I've thought of an idea that might work really well, has this ever been attempted before? Prerequisites The prerequisite for it is that email verification must be a requirement on your website, which is curre...
I am a php beginner coder. I always find myself in a mess when I try to alter or add something to my scripts. Because they are not well organized. So, I want to learn how to organize my code, so it becomes easy later on to change it. Also, there is a lot of code snippets that I use frequently in all of my scripts. Like...
I'm curious what are the drawbacks to using the ActiveRecord pattern for data access/business objects. The only one I can think of off the top of my head is that it violates the Single Responsibility Principle, but the AR pattern is common enough that this reason alone doesn't seem "good enough" to justify not using i...
Somewhere I saw a rant against java/javac allegedly using a mix of Windows and Unix style like java -classpath ... -ea ... Something IMHO, it is no mix, it's just like find works as well, isn't it? AFAIK, according to POSIX, the syntax should be like java --classpath ... --ea ... Something and -abcdef would mean spec...
I'm a full time consultant for a contracting company. Essentially, I'm just a full time employee and when my current contract is up, I roll to the 'bench' until they find me another contact. One of the independent contractors I'm colleagues with threw a job my way (he's overbooked currently) for a very small company o...
I'd like to create an application based around Apache Wave. Where can I learn more about working with Apache Wave and/or the API for a locally running instance? At the moment, the extent of what I can find seems to be APIs for Google Wave (running off Google's servers) and that it's written in Java.
A refactoring I commonly do is where I come across a large method such as public void doSomething() { // do First thing doPartA1(); doPartA2(); //now something else doSomethingElse(); doMoreSomethingElse(); doEvenMore(); // finally do this stuff someStuff(); someMoreStuff(); } ...
I'm studying TDD and I read that it also helps you to define the design of the app, correct? So I decided to start creating a new project to help me understand it better. I want to create a simple user registration system that will ask for its name, email address, country (will pick one from a list) and phone number. S...
I'm still fairly new to programming. I spend most of my time in Ruby, and I'm discovering a certain fondness for playing with regular expressions. That being said, I'm considering taking a look at Perl, just as a hobby. However, I've heard a lot about the Perl community, and none of it good. I've heard the community de...
The single largest factor in what is holding me back from being a stellar developer is my reliance on others. I feel like I ask too many questions because I fear the consequences of breaking everything and holding everyone back. So I'm overly cautious by asking so many questions that I basically get the answers after e...
I'm finishing up a port I did of a portion of a Java Library. The library calculates sunrise and sunset for a given latitude and longitude. The original Java library also calculated various times based on sunrise and sunset, which I plan to get to later. That said, I'm working with Objective-C and the Cocoa touch fra...
I consider myself to be a novice programmer -- a noob is you like. As such I'm still not sure how to get started on a project where I will be doing stuff that I've never done before. For instance, I would like to write a program that can download videos from YouTube and convert them to a format specified by the user. I...
Recently I am working on a project that involves a lot of simple numerical calculations being applied to large arrays. The numerical values are very simple but there are many different types, such as positive integers, negative integers, small floating point numbers, and so on. SIMD programming techniques (such as SSE)...
Think about persistent storage that can preserve pointers: among other things there is no need to serialize/deserialize data. For example, you typically build a tree structure and then serialize it into XML so that it can be stored permanently on disk. Now there is no need for that: the structure in memory can be left ...
I am planning to attend the Windows Azure Architect Program from S&S. http://www.windowsazurearchitect.com/ Although the website says it is a Microsoft Training Program, not sure how much credibility & recognition it has. If someone attended the program, please share feedback about the program as well.
I am a noob when it comes to programming. I just know some Ruby, that's really it when it comes to programming, but it's definitely an interest. In learning to program, I give myself tasks to complete in order to better learn Ruby but I am finding that a lot of my problems in programming deal with how to execute a task...
I am going to start Ph.D (software security research) very soon. How can I prepare for that. Please recommend any tools or softwares that I need to familiarize with before stating the Ph.D. Any advices other than softwares?
I am hiring a PHP developer to build me a website. Their rate is 70$ an hour. He seems to have a good portfolio and experience. How do I know that I get a good website that is scalable and easy to maintain? Do I ask them to give me code samples so I can review it (I am a programmer but I did not do much PHP)? What a...
I am in big dilemma what to do or not... Tomorrow have an interview on TeamViewer and Skype for a web developer position in PHP. They want to take my technical interview there, so I think they will give give me a PHP program to write. The thing is that PHP has vast variety of functions so its not possible to keep all t...
I'm making a project with 5 packages. The packages can communicate with each other by sending Messages to a central MessageQueue in the Main package and that MessageQueue takes care of all the messages. (cfr.: http://en.wikipedia.org/wiki/Java_Message_Service) Provided this image: the packages would be the clients (bo...
I'm a C# dev and I have plans of starting to develop apps targeting Android, which of course means Java. I have heard good things about Mono for Android and the idea of reusing my skill set is appealing, however the licensing cost (for now) is a bit prohibitive to me. On the other hand, from what I can see, Java is ver...
I work as a consultant programmer, typically in large businesses. I use a Windows Laptop, and many of my colleagues use a Mac. My personal preference would be to run Ubuntu if I could have complete control over my development environment. But I will have occasional need for Microsoft specific products, especially IE. M...
What language, if any, is used in this book? My school is currently using a terrible book for the algorithms course that I have to take next year and I'd like to convince the department head that Introduction to Algorithms by Cormen is a much, much better book.
I was reading a blog post over at Channel 9 about the release of an open source .NET/CLR decompiler. I was wondering as to why would you want to decompile a .NET/CLR application and look at its IL code? I'm just curious. [Edit] And are there any use for decompilers during the development phase? [Edit] I'm a little perv...
All over the Internet I see people advocating for the use of enum or const rather than #define for constant definition. Are there times when #define is more appropriate or equally appropriate? Please explain. Are there times when #define is just awful? Please elaborate. (You can say 'always' if you really wish, but ...
Builds are slow and take time. We can get MSBuild to parallelize them, but only on a single machine, not across a cluster. Why hasn't anyone come up with clustered build solutions in the .Net space? I know such solutions exist in the C++ space (e.g., IncrediBuild, Electric Cloud, etc.) but we .Net developers are forced...
I've been building a web-app with a fairly complex GUI - many small elements alongside eachother and within other elements that need various behaviours (dragging, clicking, but context-sensitive). My code tends to work like this: controls start out as html tags <li> then I add classes to the tag <li class = 'static pa...
I maintain a LGPL library for rapid development of large scale .NET applications, It's a general purpose class library containing functionalities that are used at the DAL and BLL level. So, in practice, it's a library focused towards server-side/middle-tier developers - it doesn't have any shiny or trendy stuff and a...
[Note: The below is a bit C# heavy in its syntax and conventions, such as citing FxCop rules, because this is my background, but the intent of this discussion is to be language-agnostic and the code examples used should generally be regarded as pseudo-code. — Mike] I think we would all agree that classes should general...
Why is there an emphasis to log reporting information through an application to a separate database? I have seen designs where a logging manager is available to every business layer class whether it needs it or not. This in itself can create overhead? I was thinking that reporting information logging should be done a...
What are the pros and cons of GCC vs clang/LLVM?
I was wondering, Does anybody here works in a software development team under the DevOps methodology and applying Kaizen instead Lean for continuous improvement? I read that DevOps is based on Agile methodology and Lean, but I don't know whether it's possible to use Kaizen instead Lean. Thanks.
Wikipedia lists 11 cache replacement algorithms. Assuming I know almost nothing about the application I'm going to develop, what should I use as a "default" cache replacement algorithm? If I recall correctly from my OS course, LRU is the best general cache replacement algorithm. But maybe I'm mistaken. Also, this is a ...
Through SO/P.SE browsing, I've been picking up useful pieces of Python code (e.g. a Mutable memoizer, an efficient prime generator) that I'd like to stick into one spot to have available should I need it in future projects. What are some best practices for how a "personal" code library of reusable classes/functions/mod...
How was it decided that if you have an array/struct or anything similiar in a programming language it should be zero-based? Wouldn't it have been easier if it was 1-based. Afer all, when we are taught to count, we start with one.
I have two interfaces, one with and one without generic type parameters. The non-generic interface is used internally so that I can store instances of the generic interface in a collection. All would be well except for the fact that C# does not generate method signatures based on the return type. I have a method in eac...
Different from Fastest way to document software architecture and design. I'd like to write a manual for my software which includes Command line usage Howtos/Tutorials on using the software Example code for writing plugins Manual on functions and classes for the plugin sdk I'd like to mark words for linking so i can ...
I wonder whether PERT/CPM is still being used, or, is it an ancient methodology for the world of today? Thanks.
I have worked with many languages that do not generate a method signature based on the return type. I have also worked with one(maybe some?) that do. The ones that don't have given me problems in the past (like here). Why do programming languages generate method signatures without regard to the return type? Update: I'm...
Spikes are mostly quick research tasks aimed at establishing the feasibility or prototyping of some idea. Thus, they are structured so that the tasks either finish-fast or fail-fast. However, when a dozen or so spikes are added to the current sprint, there is a possibility that several of them will fail-fast altogether...
In response to my question regarding Java source code generation, I received this answer warning me about potential maintenance problems: mixing auto-generated code always pose a risk of someone modifying it in future to just to tweak a small behavior. It's just the matter of next build, when this changes will be los...
I'm in my last year in a 4 year CS curriculum and I would very much like to contribute to a FOSS project. Unfortunately, I feel that there is no way I can do useful coding, whether it is bug fixing or feature developing. The C/C++/Java projects we undertake at school are trivial compared to coding for serious projects ...
Many web sites mostly only do CRUD (create, read, update, delete) operations to the database for different URLs. Suppose that we have a 3-tier solution with the database server on a dedicated server and the web server on another server. This question is not about the database server, but the web server. The web server ...
It was pointed out to me yesterday that I need to get a book on SQL and learn about it properly. That is probably a fair assessment; I'm a functioning SQL programmer who can in general extract from the database the information that is needed, but as soon as extracting the data needs more than a couple of joins and a wh...
Last week I was wondering, with compilers getting better and better at optimizing, will there be a point when there is no need for hand written assembly? Are there still specialized fields where the compilers aren't smart enough to produce code that rivals hand-written assembly?
I’ve decided to use DDD in one of my pet projects to find out what the fuss is about! Let me start off by saying that this (DDD) is the way software SHOULD be written, I’ve seen some strange patterns and conventions but DDD is really the most natural way of writing code. Interesting points that I noted started with DDD...
If I had a tree, would "flatten" intuitively imply get a list of all items in the tree, traversing from left to right? If i have a linked list, would "flatten" intuitively imply get a list of all items, starting with this one For example, a linked list would be made up of an exception that aggregates its inner exc...
What are the consequences of leaving work on time in software companies? What's the professional way to deal with this? [Editorial addition] The question is about working standard hours and not putting in extra hours without being explicitly asked to. Is working extra hours a norm or an expected work attitude in softwa...
How much planning should one do before starting a project? Should they have everything already planned when they begin coding or should they just get a basic idea of what they want and then make things up on the fly? For instance, I want to create a YouTube client that allows for streaming videos and for downloading mu...
What is the current status of these projects, and has any one (or two) emerged as a clear leader? To demonstrate my motives for asking this question, cast your mind back several years. Prototype and jQuery were going head-to-head with other players like MooTools fighting to survive as well. Fast forward to today, and...
Let's say you've written nifty JavaScript library that requires jQuery, and you want to host this project on github. Do you include the jQuery source with your project? Do you direct users to a download link for jQuery?
Preface I'm designing a templating language (please skip the don't/why?? speech). One of the major goals of this language is to be extensible. There are 2 main elements in my language. "Tags" and "Directives". Tags, for the most part, map 1-to-1 to HTML tags, with the exception of a few of them which do a bit more. "Di...
I found two books in my basement today and it was about Javascript and PHP/MySQL. Are they still useful? I hope it's still useful, since I don't want to buy a new one... 1.JavaScript - Comprehensive, Second Edition 2.PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
I have a code that I'd like to share, but I'd like to publish it using an open source license. But I don't know how you have to use that licenses. How do you have to activate an open source license? Just including the text of the license in all files? What else do I have to do? Do I need to buy some right? Include a re...
I have read the controversial article Teaching FP to freshmen posted by Robert Harper who is a professor in CMU. He claimed that CMU would no longer teach object oriented programming in the introductory course sine it is “unsuitable for a modern CS curriculum.” And he claimed that: Object-oriented programming is el...
I have worked on few projects in which both AOP and Object oriented paradigm were used. But, AOP usage was limited to logging only. I think AOP is a much more powerful technique. My question, to those who have worked with both AOP and OOP paradigm in projects, is, how do they come up with a solution, combining these p...
I'm looking for some advice how to get started with Logic programming, and I am really enjoying working through the Scheme book "Structure and Interpretation of Computer Programs." Is there a similar book that is geared toward Prolog? Or, if there is a better language to study than Prolog for Logic programming I am i...
I was reading "Coders at Work" and have faced the fact that some of the professionals interviewed in the book are not so enthusiastic about design patterns. I think that there are 2 main reasons for this: Design patterns force us to think in their terms. In other words, it's almost impossible to invent something new ...
I've been looking at the Chrome Store and I started to think about developing some nice stuff to publish there, since I have a machine installed with Chromium and I see the WebApp market a lot better than the platform-specific one. But what a site really needs and how it should be designed to be considered a WebApp?
When creating data-driven web pages, do you generally work on: A) functionality first B) presentation first? C) both at the same time I'm learning how to build css sites and wasn't sure of the best approach. There will be ajax calls and updates but that is pretty easy to implement. Thanks for your time and feedback...
I have opted to use silverlight for a website. This runs in all major browsers. The application could be highly graphically intensive. What have I missed? Edit: It runs on Android and other mobile platforms? I have since written about this here: http://carnotaurus.tumblr.com/post/4921541502/old-school-game-to-be-writte...
I am an iOS developer just getting started with Windows Phone. At the moment, I have the free product Visual Studio 2010 Express for Windows Phone. I see that Microsoft has several higher-end IDEs, and some of them have some very fancy price tags. My question is -- will upgrading get me significant advantages? One t...
This is a weird question but here is why: If I write some JavaScript application, or Perl/Python/PHP cli script, anyone can see the source code. I can even host my code on a public hosting site, like github for example. It will be the same: Anyone can see the code. But will that make my code open source?
A lot of developers, especially those that stay with the same company for many years and especially those working for large corporations with very healthy HR presence probably end up in this situation at one time or another. As the time progresses, you learn more, acquire new skills and end up with many more responsib...
I really apologize if this doesn't follow the S.O rules but I need a little help, I personally still classify myself as a beginner in python, Yet I've wrote a very small and VERY SURE impractical program for my boss to use. I know I'm still a beginner because simple things still perplex me but every book I read for be...
So, I've been working on Ruby with the goal of self-employment (I'm an impoverished philosopher (not even in university!) and can't get a normal low-paying job). But there is a quandary in my road of learning and discovery: I keep getting sidetracked by CS (mostly theoretical). I'm starting to think that I should consc...
It seems strange, but my manager sits right next to me and, well, when he isn't near, I feel free, and I'm planning, doing, etc, doing my work with flashes in the eyes, feel accomplishments. But everything is opposite when he's on his workplace, I simply have to force myself to do anything, I'm feeling very much worrie...
I'm debating the value of putting remote disable (or destruct) functions into my software before delivering it to clients... As a hypothetical example, consider the development of a Silverlight app where you're worried about the client not paying you. You create a function which when a specific query string is entered ...
There are situations when a name passed in Parameter will be Cast into a new type, but the name of the Passed object should remain similar. For the case of Class Attributes, we can use this operator, but what about for local variable in functions. What coding convention is widely used. example, void MyFunc(BaseClass m...