| [+] Spring » What is the best / complete spring framework tutorial ? (Go to) | | S Majumder |
| |
| [+] Spring » Spring for college project (Go to) | | Rrohit rakesh upadhyay |
Rrohit rakesh upadhyay wrote:it is a framework for making robust java applications Not true. The primary function of Spring is to provide a 'convenient' method of doing Dependency Injection (sometimes called Inversion of Control). Spring does not itself make a robust Java application, in fact I've seen quite a few enterprise applications made worse through the improper and misguided use of Spring where it is not providing any benefits. I call this CV driven development, where people choose to use some technology in a project for no good reason other than being able to put it on their CV (resume). I quoted the word 'convenient' because I am of the opinion that it's often simpler and more convenient to work without Spring, especially for a smaller application. Rrohit rakesh upadhyay wrote:1) would you suggest me to use spring for this project of mine? Probably not. Especially if you were intending to use the MVC part of Spring as it will abstract away the implementation and usage details of Servlets and it will hinder your learning experience. Also, if the assignment is about demonstrating your understanding of Servlets, then choosing to employ some other tool to do it for you might impact your grade for the assignment. The only way to know for sure is to ask this question to your project tutor. |
| [+] Other Build Tools » Learning build system - is Gradle a good place to start? (Go to) | | Tim Cooke |
For a beginner starting out and wanting to know what it means to be a 'professional'* programmer, I would highly recommend "The Pragmatic Programmer" by Andrew Hunt and David Thomas. It covers a lot of these topics from the point of why you would want to do them, rather than talking about any particular tool. It's a must for any budding programmer. (* Not necessarily professional as in paid, but professional as in not amateurish, unstructured, or hacky) |
| [+] Beginning Java » Can somebody help to Simplify the following method? (Go to) | | Tim Cooke |
I take Junilu's point, I am probably being a bit too difficult with the language thing. As an exercise in boolean logic it is not particularly important (although it would be useful for automating your testing and verifying your eventual simplification does not change the function's behaviour). I see in your previous post that you have drawn out the template of a truth table (0 = false, 1 = true) F M U 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 The next step is to evaluate the input conditions required for each return statement to be evaluated. So for the first return statement on line 9 you can follow the condition statements to determine that the inputs need to be !frumious && manxome && uffish. So enter this into your table: F M U 0 0 0 0 0 1 0 1 0 0 1 1 JUBJUB_BIRD 1 0 0 1 0 1 1 1 0 1 1 1 Then move onto the next return statement on line 13 and populate your table. Repeat for all return statements, and you will then have a completed table showing the output for each combination of inputs. See how you get on with that, then we can discuss what to do with that information. |
| [+] Beginning Java » Can somebody help to Simplify the following method? (Go to) | | Tim Cooke |
But you're left to guess what language it is? Weird. What job position was the interview for? Java? C#? |
| [+] Beginning Java » Can somebody help to Simplify the following method? (Go to) | | Tim Cooke |
If it were true, that the interviewer gave you incomplete or incorrect code, then yes. But in this case I suspect it is more likely that you are misinterpreting the question when relaying it to the forum. |
| [+] Beginning Java » Can somebody help to Simplify the following method? (Go to) | | Tim Cooke |
You cannot simplify it, if it does not work to begin with. |
| [+] Beginning Java » Can somebody help to Simplify the following method? (Go to) | | Tim Cooke |
I'm still unsure what programming language we're dealing with here! So far we've seen a mix of Java, C#, and C. Perhaps I could suggest a solution in Elixr? |
| [+] Beginning Java » Can somebody help to Simplify the following method? (Go to) | | Tim Cooke |
Also: Ama Ansah wrote:This was giving to as a test by whom? We require you to always QuoteYourSources here on the Ranch (it's a copyright thing) |
| [+] Beginning Java » Can somebody help to Simplify the following method? (Go to) | | Tim Cooke |
I'm confused about what language you are writing this in. You reference a file called "prog.cs" which suggests C#. Then you reference a file called "prog.c" which suggests C. But you have posted your question in the Beginning Java forum. Some clarification about your language choice is required. What language are you trying to use? |
| [+] Beginning Java » Can somebody help to Simplify the following method? (Go to) | | Tim Cooke |
So first things first, find out why it doesn't compile. What is the compiler telling you when you try and compile it? |
| [+] Other Build Tools » Learning build system - is Gradle a good place to start? (Go to) | | Tim Cooke |
I know that Gradle has a feature to convert a Maven built system into a Gradle built system, and it does work, although my trust level in that would decrease quickly the further away from a 'standard' configuration my Maven configuration was. As for converting from Ant... I have no idea. If the project is completely yours to mess around with then you can have a go at converting to Gradle, if only for the practice and knowledge gained through experimentation. However, if it's a shared project owned by someone else then you might just have to 'go with the flow' and use Ant or Maven or whatever. If you do want to work on these systems, then you have no choice but to learn enough Ant or Maven to get by. For example, I have a project that I contribute to from time to time that is built with Ant. I have no intention of learning all the ins and outs of the Ant build tool, but I've learnt enough of the commands to build the project and perform the tasks that I require, which I'm sure is a tiny tiny part of its overall capabilities. |
| [+] Other Build Tools » Learning build system - is Gradle a good place to start? (Go to) | | Tim Cooke |
All those build tools essentially do the same job, just with different methods of configuration. Learning Gradle would be a good place to start as it is the newest of the three you mention (Ant, Maven, and Gradle). I would strongly recommend you do take the effort to learn about the problem you are solving with a build tool, as opposed to just learning the syntax for building a project without really understanding what's going on. That way you will also gain an understanding of what Maven and Ant do, so if you come across any of those tools out in the wild it'll just be a case of learning it's syntax language. In my experience, Ant is not used that much any more. I've been programming professionally for nearly a decade now and even I seemed to have missed the Ant popularity wave. The systems I have worked on, and still do, predominantly use Maven as the build tool. However, for any personal Java projects and such, I would favour Gradle. That's mostly because it's easy to mix in Gradle support to enable me to use the Spock testing framework. |
| [+] Beginning Java » Can somebody help to Simplify the following method? (Go to) | | Tim Cooke |
Hello, and welcome to the Ranch! You should always UseCodeTags (<-- click) when posting code on the forum. I've added them for you this time, see how much better it looks? Before you start trying to simplify the method, you should take some time to make it at least compile, because currently it does not. Once you've done that there's a whole bunch of suggestions in this other thread from 7 years ago (which I assume is where you got this code from in the first place) that you could consider. |
| [+] Performance » Reading Large File Heap (Go to) | | Paul Clapham |
Here's my analogy for System.gc(); Code: "Hey GC, I got some stuff over here that I'd like cleaned up please" GC: "I hear ya. I'm kinda busy right now but I'll add it to the ToDo list and I might get to it later." Doing a 'forced GC' from your profiler tool is hardly a sustainable strategy either, so I'd forget about both of those right away. I assume that there is more to your code than that which you have presented, as what you have presented will not even compile. From what you have shown, I can see that you are adding a String object to the StringBuffer for each line of the file being read in. If that file has many many lines, then you are creating many many String objects. Can you see from your profiler where your many String objects are residing? I suspect they belong to the StringBuffer. |
| [+] GNU/Linux » Assigning output of grep to variable (Go to) | | Tim Cooke |
You could have easily found this with a quick search on the internet. But here goes anyway: I have a file called 'somefile': and a Shell script called 'do-grep.sh': (Note: Those are backticks, not single quotes.) Results in: |
| [+] GNU/Linux » Assigning output of grep to variable (Go to) | | Tim Cooke |
You say 'variables'. What language are we talking here? |
| [+] Ranch Office » A lil' thankyou (Go to) | | Tim Cooke |
I think you just made the Moose blush... |
| [+] Beginning Java » Translationg Java to pseudocode (Go to) | | Campbell Ritchie |
What don't you understand about it? Where did you get this code from (--> QuoteYourSources) |
| [+] Ranch Office » Numbering alignment in codeTagged text (Go to) | | Tim Cooke |
It appears to behave differently on different browsers. We are aware and have it in hand. |
| [+] Beginning Java » confusion over Getters(accessors) and Setters(mutators). (Go to) | | Liutauras Vilda |
Liutauras Vilda wrote:Jude, please do not re-direct OP to look for an information in different source, as OP came to the Ranch to get some help. There's nothing wrong with pointing folks to some other resource outside of the Ranch, we link to stackoverflow, and many other places, quite a lot if we think the resource is useful. Now, if you don't think the linked resource is useful, or even misleading, then it's ok to say so and suggest something else or provide clarification. The Ranch is just a collection of guys and gals who love all things about programming and computers. We love it so much we feel compelled to talk about it with strangers on a daily basis, which is how this forum survives and thrives. |
| [+] Java in General » How to learn IO (Go to) | | Abhimanyu Jain |
I wouldn't be so quick to discount one of the best learning resources available, just because you can't read it on your favourite reading device. Besides, you could use the Kindle's experimental browser to read it. |
| [+] Jobs Discussion » Career Guidance (Go to) | | Jude Niroshan |
Another hypothetical scenario: Say you got advice here suggesting that going for a 1st isn't worth it, so you didn't bother studying as hard and got a second or third class degree. Would you be happy with that because some strangers on the internet said it was OK? |
| [+] EJB and other Jakarta/Java EE Technologies » * Welcome Murat Yener & Alex Theedom (Go to) | | Deepak Lal |
Welcome Murat and Alex! I hope you enjoy your time here on the Ranch!  |
| [+] Bunkhouse Lounge » Book Club - February 2015 : "Java Puzzlers" by Joshua Bloch & Neal Gafter (Go to) | | Campbell Ritchie |
Howdy folks, Welcome to the Bunkhouse Lounge! This is where we come to talk about our favourite books, discuss what we like, don’t like, don’t understand, anything at all. There’s enough room for everyone so drop in and make yourself comfortable. For the Month of February we are inviting you to read Joshua Bloch & Neal Gafter's “Java Puzzlers” with us. Grab yourself a copy and join in the discussions! Thinking of buying a copy from Amazon? Support CodeRanch by using this referral link: Amazon (US) - Java Puzzlers by Joshua Bloch & Neal Gafter |
| [+] Jobs Discussion » Career Guidance (Go to) | | Jude Niroshan |
I don't really know what you want us to say to you. "Go for a 1st", "Don't go for a 1st", it's your choice. Nobody other than you can make this decision. |
| [+] Beginning Java » how to catch the exception? (Go to) | | Tim Cooke |
bairava surya, you've gotten lots and lots of good information in this thread. What do you make of it? Does it all make sense? Is there any part that you don't understand? You also got a lot of good information in your other thread on a similar topic that you appear to have abandoned. Did you find that useful? There are some open questions there for you too, should you wish to return and continue the discussion. |
| [+] Beginning Java » exception caught (Go to) | | J. Kevin Robbins |
I'm calling time on the curly brace placement flame war. We're heading way off topic here. I have a question for the OP: bairava surya wrote:In above even though exception is handled in catch block still it shows an error What error do you see? You haven't told us what happens when you run this code. |
| [+] Java in General » GC in multi-tenant JVM (Go to) | | Tim Cooke |
I assume that you already done some research on the topic. What particular part of the information that you have found do you not understand? |
| [+] Associate Certification (OCAJP 8) » JLS for Java Lambdas (Go to) | | Roel De Nijs |
| |
| [+] Jobs Discussion » Back Ground Verification (Go to) | | Frilly Uk |
I agree with Henry that it sounds very dodgy. With particular note on this statement: And for that Uk company there is no form 16 and of course my is not taxable You say "not taxable", but I suspect you have not paid tax because you have not declared your income. An illegal practice, colloquially termed "tax dodging". Unfortunately this raises a number of other questions: Why were you paid cash? Was it because you were employed illegally? Was the company evading tax? Were you (knowingly) evading tax? Did you have the right to work in the UK? It sounds like you're going to have a hard time explaining this one. |
| [+] JSP » Conversion of html to JSP (Go to) | | Bear Bibeault |
What requirement? What content? Tim |
| [+] JSP » Conversion of html to JSP (Go to) | | Bear Bibeault |
HTML code is valid JSP code so no conversion required. When you say "need the change content", what exactly do you mean by that? |
| [+] Meaningless Drivel » Fast zombies: patient zero? (Go to) | | Amit Ghorpade |
That's Welsh sheep for you. Let em keep their tails and they think they own the place. |
| [+] Meaningless Drivel » Fast zombies: patient zero? (Go to) | | Amit Ghorpade |
The movie Black Sheep contradicts your theory. Sheep aren't naturally that energetic when out finding nice grass to eat or doing other sheepy activities, but given half a whiff of dodgy radiation gain an unprecedented vigour for brains. You might be right about the PhD subject. We're clearly wasting our time with this software nonsense. |
| [+] Meaningless Drivel » Fast zombies: patient zero? (Go to) | | Amit Ghorpade |
"Nut up, or shut up" is my favourite quote from Zombieland. 28 Days Later is the first time I encountered speedy zombies in a movie. Terrifying, but entertaining. Mind you, wasn't the zombie cat in Pet Cemetery a nimble creature? |
| [+] Beginning Java » Question on JDK version (Go to) | | Campbell Ritchie |
Speak for yourself Campbell  |
| [+] Associate Certification (OCAJP 8) » * Winners: OCA Java SE 8 Programmer I Study Guide 1Z0-808 (Go to) | | Abhay Agarwal |
First, a big thanks to Jeanne Boyarsky & Scott Selikoff for being here to promote the book OCA Java SE 8 Programmer I Study Guide 1Z0-808. The winners are: Tomas LinhartRoel De NijsDeepak LalAbhay Agarwal Please send your snail mail address to bookpromotion AT javaranch DOT com. To ensure the quickest response, please provide the following: Your name (first and last - preferably the one you use on CodeRanch) Address (including country) Phone Number Email Whether you prefer an e-book if one is available Also, please include the following as the subject of your Email. Book Promo Winner - OCA Java SE 8 Programmer I Study Guide 1Z0-808 - Tuesday, January 27th, 2015 As noted in the Book Promotion Eligibility Requirements and Legal type stuff, the winners have 8 days to submit their information. Thanks and congrats to all the winners. |
| [+] Associate Certification (OCAJP 8) » Do you think JAVA8 certification is worth the effort and the money - SURVEY ? (Go to) | | arulk pillai |
I live in the UK. Previously in England, now Northern Ireland. |
| [+] Associate Certification (OCAJP 8) » Do you think JAVA8 certification is worth the effort and the money - SURVEY ? (Go to) | | arulk pillai |
In principle I'm not against certifications. However, I don't hold any certifications, nor have I ever been asked about it when applying for a job. In fact I don't think I've ever been asked about it at any time. Perhaps it's different in other parts of the World, but where I live most folks just aren't that bothered about it. |