Tag Info

Hot answers tagged

52

Expressiveness isn't always a positive language trait in a corporate environment. Java is extremely popular partly because its easy to learn, easy to write, and easy to read. Mediocre programmers can still be very productive in Java, even if their code is wordy and inelegant. Furthermore, it's easy to abuse expressive languages. An expert java programmer ...


23

A lack of proper input validation is one of those things which tends to lead quite quickly to users doing "bad" things with your application, when it should really be handled by the programmer. I've seen legacy apps where users have been trained to: not enter apostrophes in names not enter any symbol other than a-z0-9, ensure there are no spaces before or ...


20

Worry about performance when it becomes a problem. If you write a small app to process 10,000 line files and you get a 1,000,000 line file every 100th file, it probably doesn't matter that it takes longer to process that one file. However, if you are regularly getting files that are 5-10 times larger than initially and your application is taking too long to ...


17

In Item 5, of Effective Java, Joshua Bloch says The lesson is clear: prefer primitives to boxed primitives, and watch out for unintentional autoboxing. One good use for classes is when using them as generic types (including Collection classes, such as lists and maps) or when you want to transform them to other type without implicit casting (for ...


10

The standard practice is to go with the primitives, unless you're dealing with generics (make sure you are aware of autoboxing & unboxing!). There are a number of good reasons to follow the convention: 1. You avoid simple mistakes: There are some subtle, non-intuitive cases which often catch out beginners. Even experienced coders slip up and make ...


9

My main question is when should I trade the easy but somewhat inefficient ways of doing tasks for big giant complicated beasts that do things extremely quickly but destroy any possible ways of upgrading and make the code excessively difficult and prone to rewriting anyway by the next developer? This is usually a false dichotomy. You can ...


8

Usually I go with the primitives. However, one peculiarity of using classes like Integer and Boolean is the possibility of assigning null to those variables. Of course, this means that you have to do null checks all the time, but still better to get a NullPointerException than to have logic errors due to using some int or boolean variable that has not been ...


7

IMO, it's mostly due to: Poor library support. Sure, there's Quicklisp now, which makes it easy to install libraries, but it doesn't compensate for them being still fairly few, and quite a few are poorly documented or not very well maintained. Compared to Python, there's a good chance that writing non-trivial Lisp application (regardless of the particular ...


6

Almost every program that I write is invoked strictly from the command line. I've also written some fancier things that started out as CLI interfaces and rapidly grew into something more shell like than anything. So, I can speak only for what I know. Here's some common issues with command line programs: Way too many options Unless you are writing a ...


6

I once got a customer support call because my app just disappeared. Turned out they opened another app on top of it. ... I decided not to ensure that didn't happen again, since it was the users computer illiteracy that caused the problem, not the app. Anything I could have done to fix it would have lead to a poor user experience for others.


5

A truism I picked up studying microprocessors in college that stayed with me: "Make the common case fast. Make the uncommon case correct." As long as you have just a small percentage of users choking your code with input two orders of magnitude larger than what it was meant to handle, don't sweat it. Make sure it handles the input correctly if they give ...


5

Why is not Lisp more widespread? If it is really that powerful, people should be using it all over, If you believe that languages are chosen for their technical merits, you are in for a soul-crushing disappointment. Such decisions are made based on Strippers And Steaks. Microsoft can afford them. Oracle can. Sun spent so much money hyping Java that ...


4

I think there are a few reasons why developers tend to only use a few data structures. There are general data structures that work well enough most of the time so they become the primary choice of data structures for most problems. I know hash tables and lists are my "goto" data structures. I even know that in some of the cases I used hash tables when Red ...


4

I have no experience in working for a real company, but I know why LISP has been hard for me to use. First of all, this reminds me of this blog post: http://steve-yegge.blogspot.com/2006/04/lisp-is-not-acceptable-lisp.html The main problem that I have with Lisp is the "which Lisp" question. I usually work on Linux as my main platform, but the things I make ...


4

I think one problem with Lisp not yet mentioned is that for a mediocre or novice programmer (like myself, I freely admit), it can be difficult to see how you turn Lisp code into a big program. It's easy to write but hard to architect. I don't think any of the concepts are particularly difficult, but the DIY mentality is so strong that I often feel at a ...


3

I learned LISP a billion years ago in college. LISP, like FORTH, is great for logic. But most programming is not about logic, it's about manipulating data in boring mechanical ways. For example, at the time there as no way to right-justify numeric output. LISP is about nested functionality, and people just don't think that way. They think in terms of DO A, ...


3

Schaum's Outlines series has a book on UML which I found really useful. It has loads of examples and exercises. I was confused about UML too but this book really simplified things. http://www.amazon.co.uk/Schaums-Outlines-UML-Simon-Bennett/dp/0077096738


3

I don't feel like getting specific break/fix examples is as important as realizing this: Users do not read your manual, or watch your tutorials. They learn your software through exploration. If through that exploration they break something, as a programmer it is your job to either warn them of the danger or prevent it from happening in the first place. I ...


2

I don't think users are stupid. They don't want to use your or any program at all. All they want is to get their things done. Help them and prevent harm from happening to them along the way.


2

"Are you sure you want to delete this file/record? Yes/No". Clicked yes and then got a call that it "mistakenly" clicked the red delete button and it needs that data back:)


2

It seems that even CL does not have very good library support. At least according to people who switched from Lisp to Python: http://www.redmountainsw.com/wordpress/archives/reddit-switches-from-lisp-to-python Personally, I know some Scheme and enjoy playing with it, but can't imagine doing a non-trivial project in that language.


2

Here you can get statistics... http://trends.builtwith.com/framework You can use this site to get lots of statistics on many different technologies.


1

Depending on your setup, you may be able to use web tools - just have the app send a request to a URL that is unique to the feature being used. Naturally this would need to be opt-in and would only work when the user is connected, but that's still a much more inclusive data set than you currently have. You could handle offline usage also as long as the ...


1

For web development with Lisp dialects, there can be a bit of a chicken-and-egg problem - because few people use Lisp, hosts either don't allow it or don't make it easy, and because it's not easy, few people use it. But actually, getting Lisp running on a host can be easier than you might think, even if it requires a bit more work than their out-of-the-box ...


1

Being powerful doesn't necessarily imply widespread use. Have you heard of the term 'Optimize for the common case'? Unfortunately as many have told before mediocrity if assured consistently is a lot better for people than big hits with many failures in between them. This isn't just the case with lisp, but with a lot of technologies. A good touch over Unix ...


1

IMO, it's mostly a matter of poor timing: Lisp was old (and almost by definition no longer exciting) long before it became practical for most people or uses. Clojure (for one example) stands a much better chance. Its success will depend far more on being perceived as new, fashionable and cool than anything as practical as interoperation with Java (and ...


1

Keep an eye on Clojure (and maybe learn it since you're on a LISP learning roll). It runs on the JVM so that really gives it an advantage in industry. A craigslist search in SF bay area got me 4 hits for clojure and 1 each for lisp and scheme.


1

I tend to use pieces of UML to work through difficult designs. Learning how to think visually about systems is important; UML is as good if not better than other diagramming choices. But in practical reality, boxes and arrows are sufficient. UML is a nice 'standard' for communicating designs to other programmers. Some end-users can be trained to read ...


1

Is it still being maintained or is this a bad choice if I want to do jQuery with RoR? Their website doesn't exist anymore, their Google Group has some spam and their code isn't updated. I guess this isn't maintained anymore and might be a bad choice for continuous development...


1

Having a good user interface and providing an adequate learning experience goes a long way towards preventing users from doing bad things. Good user interfaces should be frictionless. Instead of throwing up a dialog box (an expensive operation, and one that users ignore after awhile) to confirm a delete, perform the delete, and offer a way to undo. Good ...



Only top voted, non community-wiki answers of a minimum length are eligible