To me, as a developer and as a user, I find the empty string ("") useless and the cause of much confusion, it's like saying string == char[]
Maybe computers need the empty string, so I'd like to learn why.
See also:
Default string initialization: NULL or Empty?
Best Practice: Should functions return null or an empty object...
I have a meager production environment running on my PC for a little application that I work on in my spare time. At this point I have the basics setup, MySQL, junit, svn... I am midway through development and I now need to generate various reports (not development/logging/event reports). These reports are based on what data is in the da...
What is another good word for Business Logic?
Software might also run in civil service offices or for hobbyists, so I never felt that comfortable with using that term in certain modules and documentation.
App Logic is too specific as well, because logic modules might also be used in services.
...
Pretty clear from the title itself, what is meant by porting an application X to a platform Y?
Say for example I have an application X running on some OS, say Y, What do I do to port this application to another OS say Z?
Does this mean rewriting a new application A for Operating system Z that necessarily imitates the behavior of applica...
I often read about the importance of readability and maintainability. Or, I read very strong opinions about which syntax features are bad or good. Or discussions about the values of certain paradigms, like OOP.
Aside from that, this same question floats about in my mind whenever I read debates on SO or Meta about subjective questions. O...
What genetic-programming library, regardless of language, has the most active community and is the most well developed?
...
This is admittedly a rather loose question. My current understanding of singletons is that they are a class that you set up in such a way that only one instance is ever created.
This sounds a lot like a static class to me. The main differnce being that with a static class you don't / can't instance it, you just use it such as Math.pi()....
I am implementing a screen using MVP pattern, with more feature added to the screen, I am adding more and more methods to the IScreen/IPresenter interface, hence, the IScreen/IPresenter interface is becoming bigger and bigger, what should I do to cope with this situation?
...
Please state if you are developing on the front end, back end, or if you are developing a mobile/desktop application.
List your development stack
Language, IDE, etc..
Unit Testing or no Unit Testing
Be sure to include any AOP frameworks if used.
Tell me if it is easier for you to use a debugger or to using logging during development, ...
I have a GUI tool that manages state sequences. One component is a class that contains a set of states, your typical DFA state machine. For now, I'll call this a StateSet (I have a more specific name in mind for the actual class that makes sense, but this name I think will suffice for the purpose of this question.)
However, I have ano...
I was used to the traditional way of doing database searching with the following
using wildcards for term searches
using where clause for specific data like addresses and names
but at other times, I found these common methods to produce code that is so bloated, especially when it comes to complex searches.
Are there algorithms out ...
I need to encode streams of 8 byte such that encoded stream has only digits (zero to nine) in them. Are their any standard encoding mechanism for doing this? If there are multiple ways to do it, which one is efficient in terms of length of encoded string (shorter is better)?
...
Given a string s, what is the fastest method to generate a set of all its unique substrings?
Example: for str = "aba" we would get substrs={"a", "b", "ab", "ba", "aba"}.
The naive algorithm would be to traverse the entire string generating substrings in length 1..n in each iteration, yielding an O(n^2) upper bound.
Is a better bound p...
I've looked into some questions here where the "best" programming books are listed and then thought why there isn't a question concerning speeches yet. I think that speeches or presentations from developers or even creators of programming languages which were or are heavily used at some point are particulary interesting.
One of my favor...
What's more appropriate than a Spiral for Easter Code Golf sessions? Well, I guess almost anything.
The Challenge
The shortest code by character count to display a nice ASCII Spiral made of asterisks ('*').
Input is a single number, R, that will be the x-size of the Spiral. The other dimension (y) is always R-2. The program can assume...
Hi
I was discussing this at work, and was wondering where people start their designs? We tend to start with designing code to solve the problem presented to us, but that is probably all of us are (or were) programmers.
I was wondering where other people and organisations start their design. Do they start with solving the problem as a ...
How is it better to encode a complex number into RGB pixel and vice versa?
Probably (logarithm of) an absolute value goes to brightness and an argument goes to hue.
Desaturated pixes should receive randomized argument in reverse transformation.
Something like:
0 -> (0,0,0)
1 -> (255,0,0)
-1 -> (0,255,255)
0.5 -> (128,0,0)
i -> (255,2...
Note: This is my first Code Golf challenge/question, so I might not be using the correct format below. I'm not really sure how to tag this particular question, and should this be community wiki? Thanks!
This Code Golf challenge is about solving word searches!
A word search, as defined by Wikipedia, is:
A word search, word find, wor...
What algorithm would you suggest to identify how much from 0 to 1 (float) two texts are identical?
Note that I don't mean similar (ie, they say the same thing but in a different way), I mean exact same words, but one of the two texts could have extra words or words slightly different or extra new lines and stuff like that.
A good examp...
can a function return more than one value?
Edit
Except return by reference.
...