Search Results

Search found 29 results on 2 pages for 'farmboy'.

Page 1/2 | 1 2  | Next Page >

  • Java devs: why not use Groovy?

    - by FarmBoy
    OK, so there are quite a few people using Java these days. But as the language nears two decades of age, it isn't exactly the coolest option out there. Many of us are excited about dynamic languages with some functional features like Ruby or Python, even though we spend our days using Java. So why is it that the adoption of Groovy has been so slow? It seems that Groovy offers much of the benefits of Ruby and Python, but it is far easier to transition a Java shop to Groovy. Even if performance were the concern, it seems that many would want to use Groovy for testing the production Java code. Or use Groovy/Grails for internal apps in which performance concerns are minimal. Or for writing one-off scripts to generate code. Yet Groovy languishes outside of Tiobe's top 50 languages, for reasons that are unclear to me. I have been using Groovy and Grails professionally for about four months, and it has been an excellent experience, such that I hate to think about going back to the Java/Spring/Hibernate model. Does anyone have any sense on why we are not seeing more significant migration from Java to Groovy? Note that I'm not asking why Java developers are still using Java for new projects. My question is: Why is it that most Java Developers are still not using Groovy at all. Edit: I am assuming that all good developers see the utility of dynamic typing and higher order functions for some programming tasks. (Even if it is deemed inappropriate for production code.)

    Read the article

  • Is there any evidence that one of the current alternate JVM languages might catch on?

    - by FarmBoy
    There's been a lot of enthusiasm about JRuby, Jython, Groovy, and now Scala and Clojure as the language to be the successor to Java on the JVM. But currently only Groovy and Scala are in the TIOBE top 100, and none are in the top 50. Is there any reason to think that any of this bunch will ever gain significant adoption? My question is not primarily about TIOBE, but about any evidence that you might see that could indicate that one of these languages could get significant backing that goes beyond the enthusiasts.

    Read the article

  • Why is Software Engineering not the typical major for future software developers?

    - by FarmBoy
    While most agree that a certain level of Computer Science is essential to being a good programmer, it seems to me that the principles of good software development is even more important, though not as fundamental. Just like mechanical engineers take physics classes, but far more engineering classes, I would expect, now that software is over a half century old, that software development would begin to dominate the undergraduate curriculum. But I don't see much evidence of this. Is there a reason that Software Engineering hasn't taken hold as an academic discipline?

    Read the article

  • Is Haskell's type system an obstacle to understanding functional programming?

    - by FarmBoy
    I'm studying Haskell for the purpose of understanding functional programming, with the expectation that I'll apply the insight that I gain in other languages (Groovy, Python, JavaScript mainly.) I choose Haskell because I had the impression that it is very purely functional, and wouldn't allow for any reliance on state. I did not choose to learn Haskell because I was interested in navigating an extremely rigid type system. My question is this: Is a strong type system a necessary by-product of an extremely pure functional language, or is this an unrelated design choice particular to Haskell? If it is the latter, I'm curious what would be the most purely functional language that is dynamically typed. I'm not particularly opposed to strong typing, it has its place, but I'm having a hard time seeing how it benefits me in this educational endeavor.

    Read the article

  • Firefox 4, 5 hang on Windows XP

    - by FarmBoy
    I've been having a lot of trouble with Firefox 4 and 5 hanging on my Windows XP machine. I've often found a temporary solution of uninstalling and reinstalling. Recently I deleted my Firefox profile to get a clean start. But nothing seems a reliable solution. The only plugin that I have is Firebug. My machine is a bit low on RAM, with only 2 GB. Am I missing something? Any troubleshooting steps that you would recommend? I've come to expect Firefox to be very stable, and that has not at all been my experience lately.

    Read the article

  • What is "The" book for database design?

    - by FarmBoy
    In programming, there is often a canonical book for a particular topic, like the dragon book for compilers, K&R for C, etc. Is their a book regarding modern database design that simply must be read by anyone that would hope to eventually design databases? I'm not looking for a bunch of recommendations here. The answer I'm looking for is either "Yes, it's [Title, author]." or "No, there are many good books on databases, but no one must-read."

    Read the article

  • How can I set my computer up for remote SSH access?

    - by FarmBoy
    I have a Linux machine that I can access by SSH from my laptop when I am inside my house, but when I am using another Internet connection, I can't connect. What do I need to do? I have Verizon DSL Internet and an ActionTec modem, if that matters. If there are other relevant facts I'm omitting, please let me know and I'll improve my question.

    Read the article

  • What's the entry path towards a database administrator job?

    - by FarmBoy
    I've recently lost my job, and I'm working towards changing vocations. My degrees are in Mathematics, but I'm interested in IT, particularly working as a DBA or a programmer. I don't have IT experience, but I have the resourses to be patient with the transition, and I'm currently learning SQL and Java. Obviously, I need some job experience. My question is this: What entry-level jobs might allow me to gain useful experience towards obtaining a DBA job? It seems to me that programmers often start as testers, and system administrators could start at a help-desk position, but it is unclear how one begins to work with a company's database.

    Read the article

  • Selenium RC 403 Error - Forbidden for proxy

    - by FarmBoy
    I'm trying to run Selenium RC 1.0.3 using Java 6, JUnit 4, and Eclipse on Snow Leopard. Here is my test class, from the Selenium docs: public class TestCase extends SeleneseTestCase { @Before public void before() throws Exception { setUp("http://www.google.com/", "*firefox"); } @Test public void test() { selenium.open("/"); selenium.type("q", "selenium rc"); selenium.click("btnG"); selenium.waitForPageToLoad("30000"); assertTrue(selenium.isTextPresent("Advanced search")); } } I've tried (finding various suggestions on the web) replacing *firefox with *chrome or *firefox, replacing http with https and adding selenium.start(), but none have helped, or even changed the behavior. Any ideas?

    Read the article

  • How do I run JUnit from NetBeans?

    - by FarmBoy
    I've been trying to understand how to start writing and running JUnit tests. When I'm reading this article: http://junit.sourceforge.net/doc/testinfected/testing.htm I get the the middle of the page and they write, "JUnit comes with a graphical interface to run tests. Type the name of your test class in the field at the top of the window. Press the Run button." I don't know how to launch this program. I don't even know which package it is in, or how you run a library class from an IDE. Being stuck, I tried this NetBeans tutorial: http://www.netbeans.org/kb/docs/java/junit-intro.html It seemed to be going OK, but then I noticed that the menu options for this tutorial for testing a Java Class Library are different from those for a regular Java application, or for a Java Web App. So the instructions in this tutorial don't apply generally. I'm using NetBeans 6.7, and I've imported JUnit 4.5 into the libraries folder. What would be the normal way to run JUnit, after having written the tests? The JUnit FAQ describes the process from the Console, and I'm willing to do that if that is what is typical, but given all that I can do inside netbeans, it seems hard to believe that there isn't an easier way. Thanks much. EDIT: If I right-click on the project and select "Test" the output is: init: deps-jar: compile: compile-test: test-report: test: BUILD SUCCESSFUL (total time: 0 seconds) This doesn't strike me as the desired output of a test, especially since this doesn't change whether the test condition is true or not. Any ideas?

    Read the article

  • How to print a specific actionerror message with Struts2 validation?

    - by FarmBoy
    When using Struts2 validation, when you put the <s:actionerror> tag in your JSP, the default behavior is to display all the action errors at that point in the page. Is there a way to display only specific error messages at that point? For example, in the case of fielderror one only needs to add the fieldName attribute. Is there an attribute of actionerror that accomplishes similar behavior?

    Read the article

  • How to change the Struts2 validation error message in the case of an invalid field value?

    - by FarmBoy
    I'm using Struts2 validation on a web form. In the case that a field is suppose to be an integer or Date, the <s:fielderror> message I receive is a generic Invalid field value for field "[fieldname]" Naturally, I want to customize this for the user. Here's an example validation: <field name="spouseDOB"> <field-validator type="date"> <message>"Spouse Date of Birth" is invalid.</message> </field-validator> <field-validator type="date"> <param name="min">01/01/1900</param> <message>"Spouse Date of Birth" must be after 1900 AD. </field-validator> </field> The message "Spouse Date of Birth" is invalid. never appears, for any invalid date that I have tried. The output is the generic Invalid field value for field spouseDOB spouseDOB is a java.util.Date object in the action class. It is set by a <s:textfield> in the JSP.

    Read the article

  • How to set subversion global-ignores to eliminate .metadata?

    - by FarmBoy
    I'm trying to set up Subversion on Ubuntu Linux. It seems to be working, except that when I made one change and tried svn status, I found about 100 files had been changed, in the .metadata directory. My ~/.subversion/config file currently contains the following line: global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ .*.swp .DS_Store What do I need to add to ignore the .metadata files? The directory under consideration is used by Eclipse for Python development using PyDev, if that matters.

    Read the article

  • How to get a Token from a Lucene TokenStream?

    - by FarmBoy
    I'm trying to use Apache Lucene for tokenizing, and I am baffled at the process to obtain Tokens from a TokenStream. The worst part is that I'm looking at the comments in the JavaDocs that address my question. http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/analysis/TokenStream.html#incrementToken%28%29 Somehow, an AttributeSource is supposed to be used, rather than Tokens. I'm totally at a loss. Can anyone explain how to get token-like information from a TokenStream?

    Read the article

  • How to use JNDI to obtain a new Stateful Session Bean, in EJB3?

    - by FarmBoy
    I'm trying to use JNDI to obtain a new Stateful Session Bean in a servlet (as a local variable). My doGet() method has the following: Bean bean = (Bean) new InitialContext().lookup("beanName"); I've tried including java:comp/env but all of my attempts have led to naming exceptions. I'm attempting to bind the bean in the @Stateful annotation, using various guesses like @Stateful(name="beanName") and @Stateful(mappedName="beanName")

    Read the article

  • How to improve my Python regex syntax?

    - by FarmBoy
    I very new to Python, and fairly new to regex. (I have no Perl experience.) I am able to use regular expressions in a way that works, but I'm not sure that my code is particularly Pythonic or consise. For example, If I wanted to read in a text file and print out text that appears directly between the words 'foo' and 'bar' in each line (presuming this occurred one or zero times a line) I would write the following: fileList = open(inFile, 'r') pattern = re.compile(r'(foo)(.*)(bar)') for line in fileList: result = pattern.search(line) if (result != None): print result.groups()[1] Is there a better way? The if is necessary to avoid calling groups() on None. But I suspect there is a more concise way to obtain the matching String when there is one, without throwing errors when there isn't. I'm not hoping for Perl-like unreadability. I just want to accomplish this common task in the commonest and simplest way.

    Read the article

  • Why can I run JUnit tests for my Spring project, but not a main method?

    - by FarmBoy
    I am using JDBC to connect to MySQL for a small application. In order to test without altering the real database, I'm using HSQL in memory for JUnit tests. I'm using Spring for DI and DAOs. Here is how I'm configuring my HSQL DataSource <bean id="mockDataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource"> <property name="driverClassName" value="org.hsqldb.jdbcDriver"/> <property name="url" value="jdbc:hsqldb:mem:mockSeo"/> <property name="username" value="sa"/> </bean> This works fine for my JUnit tests which use the mock DB. But when I try to run a main method, I find the following error: Error creating bean with name 'mockDataSource' defined in class path resource [beans.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [org.hsqldb.jdbcDriver] I'm running from Eclipse, and I'm using the Maven plugin. Is there a reason why this would work as a Test, but not as a main()? I know that the main method itself is not the problem, because it works if I remove all references to the HSQL DataSource from my Spring Configuration file.

    Read the article

  • How to set up jndi.properties for DataStore?

    - by FarmBoy
    I'm struggling to set connect a Java program to MySQL using JPA/Hibernate. I'm currently getting the following error when I try to call createEntityManagerFactory(): [main] ERROR org.hibernate.connection.DatasourceConnectionProvider - Could not find datasource: java:jdbc/myDataDS javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325) at javax.naming.InitialContext.lookup(InitialContext.java:392) at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75) Googling seems to indicate that I need a jndi.properties file in META-INF in my classpath, but I can't seem to find any information about what that file should contain in my case.

    Read the article

  • How do I obtain a new stateful session bean in a servlet thread?

    - by FarmBoy
    I'm experimenting with EJB3 I would like to inject a stateful session bean into a servlet, so that each user that hits the servlet would obtain a new bean. Obviously, I can't let the bean be an instance variable for the servlet, as that will be shared. And apparantly injecting local variables isn't allowed. I can use the new operator to create a bean, but that doesn't seem the right approach. Is there a right way to do this? It seems like what I'm trying to do is fairly straightforward, after all, we would want each new customer to find an empty shopping cart.

    Read the article

  • What is a good standard exercise to learn the OO features of a language?

    - by FarmBoy
    When I'm learning a new language, I often program some mathematical functions to get used to the control flow syntax. After that, I like to implement some sorting algorithms to get used to the array/list constructs. But I don't have a standard exercise for exploring the languages OO features. Does anyone have a stock exercise for this? A good answer would naturally lend to inheritance, polymorphism, etc., for a programmer already comfortable with these concepts. An ideal answer would be one that could be communicated in a few words, without ambiguity, in the way that "implement mergesort" is completely unambiguous. (As an example, answering "design a game" is so vague as to be useless.) Any ideas? EDIT: I have to remark that the results here are somewhat ironic. 10 upvotes and (originally) 5 favorites suggest that this is a question others are interested in. Yet the most upvoted answer is one that says there is no good answer. Oh well. I think I'll look at the textbook below, I've found games useful in the past for OO.

    Read the article

  • How to determine if a List is sorted in Java?

    - by FarmBoy
    I would like a method that takes a List<T> where T implements Comparable and returns true or false depending on whether the list is sorted or not. What is the best way to implement this in Java? It's obvious that generics and wildcards are meant to be able to handle such things easily, but I'm getting all tangled up. It would also be nice to have an analogous method to check if the list is in reverse order.

    Read the article

  • Why can't I find `len(list)` in Python?

    - by FarmBoy
    I'm new to Python. I have a method that begins: def foo(self, list): length = len(list) I've called len() successfully in other cases, but here I get: TypeError: object of type 'type' has no len() How do I convince Python that this object passed in is a list? What am I missing?

    Read the article

1 2  | Next Page >